INNER CODE UNIT · Java
Hashes
norkator/cryptography · src/cryptography/Hashes.java:27
public class Hashes {
public static void main(String[] args) {
// Allows use of tougher crypto
Security.setProperty("crypto.policy", "unlimited");
// CRC-8
System.out.println("CRC-8 hash: " + CRC.crc8("test"));
// CRC-16
System.out.println("CRC-16 hash: " + CRC.crc16("test"));
// CRC-24
System.out.println("CRC-24 hash: " + CRC.crc24("test"));
// CRC-32
System.out.println("CRC-32 hash: " + CRC.crc32("test"));