import java.util.zip.Adler32; import java.util.zip.Checksum; public class Main { public static void main(String[] argv) throws Exception { byte[] bytes = "some data".getBytes(); Checksum checksumEngine = new Adler32(); checksumEngine.update(bytes, 0, bytes.length); long checksum = checksumEngine.getValue(); } }