CRC8 implementation with configurable polynomials.
f
crc8(): number
data: Uint8Array,
polynomial?: number
Calculates CRC8 checksum for the given data.
f
createCrc8(polynomial: number): (data: Uint8Array) => number
Creates a CRC8 function for the given polynomial.
f
memoizedCreateCrc8(polynomial: number): (data: Uint8Array) => number
Memoized version of createCrc8.
v
CRC8_CCITT_POLYNOMIAL: 224
CRC8-CCITT polynomial (ATM HEC).
v
CRC8_MAXIM_POLYNOMIAL: 140
CRC8-Maxim/Dallas polynomial (1-Wire, iButton).
Usage
import * as mod from "crc8.ts";