hash.crc64
Constants #
const ecma = u64(0x42F0E1EBA9EA3693)
Polynomial constants for CRC-64
fn new #
fn new(poly u64) &Crc64
new creates a Crc64 polynomial.
fn sum #
fn sum(b []u8) u64
sum calculates the CRC-64 checksum of b by using the ECMA polynomial.
fn sum_with_poly #
fn sum_with_poly(poly u64, b []u8) u64
sum_with_poly calculates the CRC-64 checksum of b for the provided polynomial.
fn (Crc64) update_state #
fn (c &Crc64) update_state(state u64, b []u8) u64
update_state updates an internal CRC state with the bytes in b. For CRC-64-ECMA-182, use state 0 for a new stream.
fn (Crc64) checksum #
fn (c &Crc64) checksum(b []u8) u64
checksum returns the CRC-64 checksum of data b by using the polynomial represented by c's table.
fn (Crc64) update #
fn (c &Crc64) update(crc u64, b []u8) u64
update returns the updated CRC-64 checksum for b, starting from crc. Use crc = 0 for a fresh checksum, or pass a previous result to continue streaming.