go1.20.5
GoThrough

crc32.Castagnoli

// Predefined polynomials. // Castagnoli's polynomial, used in iSCSI. // Has better error detection characteristics than IEEE. // https://dx.doi.org/10.1109/26.231911 const Castagnoli = 0x82f63b78

crc32.IEEE

// Predefined polynomials. // IEEE is by far and away the most common CRC-32 polynomial. // Used by ethernet (IEEE 802.3), v.42, fddi, gzip, zip, png, ... const IEEE = 0xedb88320

crc32.Koopman

// Predefined polynomials. // Koopman's polynomial. // Also has better error detection characteristics than IEEE. // https://dx.doi.org/10.1109/DSN.2002.1028931 const Koopman = 0xeb31d82e

crc32.Size

// The size of a CRC-32 checksum in bytes. const Size = 4

crc32.IEEETable

// IEEETable is the table for the IEEE polynomial. var IEEETable = simpleMakeTable(IEEE)

crc32.Checksum

// Checksum returns the CRC-32 checksum of data // using the polynomial represented by the Table. func Checksum(data []byte, tab *Table) uint32

crc32.ChecksumIEEE

// ChecksumIEEE returns the CRC-32 checksum of data // using the IEEE polynomial. func ChecksumIEEE(data []byte) uint32

crc32.MakeTable

// MakeTable returns a Table constructed from the specified polynomial. // The contents of this Table must not be modified. func MakeTable(poly uint32) *Table

crc32.New

// New creates a new hash.Hash32 computing the CRC-32 checksum using the // polynomial represented by the Table. Its Sum method will lay the // value out in big-endian byte order. The returned Hash32 also // implements encoding.BinaryMarshaler and encoding.BinaryUnmarshaler to // marshal and unmarshal the internal state of the hash. func New(tab *Table) hash.Hash32

crc32.NewIEEE

// NewIEEE creates a new hash.Hash32 computing the CRC-32 checksum using // the IEEE polynomial. Its Sum method will lay the value out in // big-endian byte order. The returned Hash32 also implements // encoding.BinaryMarshaler and encoding.BinaryUnmarshaler to marshal // and unmarshal the internal state of the hash. func NewIEEE() hash.Hash32

crc32.Update

// Update returns the result of adding the bytes in p to the crc. func Update(crc uint32, tab *Table, p []byte) uint32