Calculate Adler-32 Checksum using Java

Adler32 class

package app;

import java.util.zip.Adler32;

public class Main
{
    public static void main(String[] args)
    {
        String text = "Hello";
        Adler32 adler32 = new Adler32();
        adler32.update(text.getBytes());
        long checksum = adler32.getValue();

        System.out.println(checksum);
    }
}

Leave a Comment

Cancel reply

Your email address will not be published.