Lines Matching refs:crc
41 pub fn crc64_be(mut crc: u64, buf: &[u8]) -> u64 { in crc64_be()
43 let t = ((crc >> 56) ^ (byte as u64)) & 0xff; in crc64_be()
44 crc = CRC64_TABLE[t as usize] ^ (crc << 8); in crc64_be()
46 crc in crc64_be()
57 pub fn crc64_rocksoft_generic(mut crc: u64, buf: &[u8]) -> u64 { in crc64_rocksoft_generic()
58 crc = !crc; in crc64_rocksoft_generic()
61 crc = (crc >> 8) ^ CRC64_ROCKSOFT_TABLE[(((crc & 0xff) as u8) ^ (byte)) as usize]; in crc64_rocksoft_generic()
64 return !crc; in crc64_rocksoft_generic()
75 let crc = crc64_be(0, &buf); in crc64_be_single() localVariable
76 assert_eq!(crc, 0x2d071b6213a0cb8b); in crc64_be_single()
82 let crc = crc64_be(0, buf); in crc64_be_multibytes() localVariable
83 assert_eq!(crc, 0x2a71ab4164c3bbe8); in crc64_be_multibytes()