Class Crc32c
java.lang.Object
com.marksayson.deletionchecker.checksum.Crc32c
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 Summary
Modifier and TypeMethodDescriptionstatic longof(byte[] data) Returns the CRC32C ofdata.static longof(ByteBuffer data) Returns the CRC32C ofdata's remaining bytes, leaving its position and limit unchanged.
-
Method Details
-
of
public static long of(byte[] data) Returns the CRC32C ofdata.- 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
Returns the CRC32C ofdata's remaining bytes, leaving its position and limit unchanged.- Parameters:
data- the bytes to checksum, frompositiontolimit- Returns:
- the CRC32C as an unsigned 32-bit value (0 to 2^32 - 1) in the low bits of the result
-