java.lang.Object
com.marksayson.deletionchecker.checksum.Crc32c

public final class Crc32c extends Object
CRC32C (Castagnoli, 32-bit) — the integrity check on each packed entity-type file.

Delegates to CRC32C, which the JVM accelerates with the CPU's CRC instruction where available. CRC32C detects accidental corruption and truncation (bit flips, burst errors); it is not a defense against a deliberately crafted collision, which is outside the dataset's threat model. The manifest's SHA-256 (see Sha256) is the trust anchor above it.

  • Method Details

    • of

      public static long of(byte[] data)
      Returns the CRC32C of data.
      Parameters:
      data - the bytes to checksum
      Returns:
      the CRC32C as an unsigned 32-bit value (0 to 2^32 - 1) in the low bits of the result
    • of

      public static long of(ByteBuffer data)
      Returns the CRC32C of data's remaining bytes, leaving its position and limit unchanged.
      Parameters:
      data - the bytes to checksum, from position to limit
      Returns:
      the CRC32C as an unsigned 32-bit value (0 to 2^32 - 1) in the low bits of the result