package crc32
Import Path
hash/crc32 (on golang.org and go.dev)
Dependency Relation
imports 5 packages, and imported by one package
Involved Source Files
d-> crc32.go
crc32_amd64.go
crc32_generic.go
crc32_amd64.s
Exported Type Names
Exported Values
const
Castagnoli = 2197175160
Castagnoli's polynomial, used in iSCSI.
Has better error detection characteristics than IEEE.
https://dx.doi.org/10.1109/26.231911
func
Checksum(data []
byte, tab *
Table)
uint32
Checksum returns the CRC-32 checksum of data
using the polynomial represented by the Table.
func
ChecksumIEEE(data []
byte)
uint32
ChecksumIEEE returns the CRC-32 checksum of data
using the IEEE polynomial.
const
IEEE = 3988292384
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
Koopman = 3945912366
Koopman's polynomial.
Also has better error detection characteristics than IEEE.
https://dx.doi.org/10.1109/DSN.2002.1028931
func
MakeTable(poly
uint32) *
Table
MakeTable returns a Table constructed from the specified polynomial.
The contents of this Table must not be modified.
func
New(tab *
Table)
hash.
Hash32
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
NewIEEE()
hash.
Hash32
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.
const
Size = 4
The size of a CRC-32 checksum in bytes.
 |
The pages are generated with Golds v0.1.6. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project and developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |