Crate const_crc32
source ·Expand description
A const fn
crc32 checksum implementation.
Examples
const BYTES: &[u8] = "The quick brown fox jumps over the lazy dog".as_bytes();
const CKSUM: u32 = const_crc32::crc32(BYTES);
assert_eq!(CKSUM, 0x414fa339_u32);
Functions
- A
const fn
crc32 checksum implementation. - Calculate crc32 checksum, using provided
seed
as the initial state, instead of the default initial state of0u32
.