Skip to content

hash.crc32 #

Constants #

const ieee = u32(0xedb88320)

polynomials

const castagnoli = u32(0x82f63b78)
const koopman = u32(0xeb31d82e)

fn new #

fn new(poly int) &Crc32

new creates a Crc32 polynomial.

fn sum #

fn sum(b []u8) u32

sum calculates the CRC-32 checksum of b by using the IEEE polynomial.

fn (Crc32) checksum #

fn (c &Crc32) checksum(b []u8) u32

checksum returns the CRC-32 checksum of data b by using the polynomial represented by c's table.