Java tutorial
//package com.java2s; public class Main { public static Integer calculateCheckSumFor(String message) { Integer byteSum = 0; for (Character character : message.toCharArray()) { byteSum += (int) character; } return byteSum % 256; } }