Documentation ¶
Overview ¶
Package crc8 implements the 8-bit cyclic redundancy check, or CRC-8, checksum. See http://en.wikipedia.org/wiki/Cyclic_redundancy_check and http://www.ross.net/crc/download/crc_v3.txt for information.
Index ¶
Constants ¶
View Source
const (
ATM = 0x07 // x^8 + x^2 + x + 1
)
Predefined polynomials.
View Source
const Size = 1
Size of a CRC-8 checksum in bytes.
Variables ¶
View Source
var ATMTable = makeTable(ATM)
ATMTable is the table for the ATM polynomial.
Functions ¶
func Checksum ¶
Checksum returns the CRC-8 checksum of data, using the polynomial represented by the Table.
func ChecksumATM ¶
ChecksumATM returns the CRC-8 checksum of data using the ATM polynomial.
func New ¶
New creates a new hashutil.Hash8 computing the CRC-8 checksum using the polynomial represented by the Table.
Types ¶
Click to show internal directories.
Click to hide internal directories.