Calculate CRC32 Checksum using Java

CRC32 class

package app;

import java.util.zip.CRC32;

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

        System.out.println(checksum);
    }
}

Leave a Comment

Cancel reply

Your email address will not be published.