org.snapscript.studio.agent.event.MessageChecker Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap-all Show documentation
Show all versions of snap-all Show documentation
Dynamic scripting for the JVM
package org.snapscript.studio.agent.event;
import java.util.zip.Adler32;
import java.util.zip.Checksum;
public class MessageChecker {
public static long check(byte[] data, int offset, int length) {
Checksum checksum = new Adler32();
checksum.update(data, offset, length);
return checksum.getValue();
}
}