UNPKG

@taichunmin/crc

Version:

A cross platform alternative for calculating Cyclic Redundancy Checks (CRC) values.

48 lines (46 loc) 1.7 kB
declare class GenericCrc8 { name: string; readonly initial: number; readonly poly: number; readonly refin: boolean; readonly refout: boolean; readonly tbl: Uint8Array<ArrayBuffer>; readonly u8: Uint8Array<ArrayBuffer>; readonly xorout: number; constructor(opts: { name: string; poly: number; initial: number; xorout: number; refin: boolean; refout: boolean; }); buildPoly(poly: number): void; getCrc(buf: Uint8Array): number; dumpPoly(space?: number): string; exportCrcFn(): string; exportTest1(): string; exportTest2(): string; } declare const crc8: GenericCrc8; declare const crc8autosar: GenericCrc8; declare const crc8bluetooth: GenericCrc8; declare const crc8cardx: GenericCrc8; declare const crc8cdma2000: GenericCrc8; declare const crc8darc: GenericCrc8; declare const crc8dvbs2: GenericCrc8; declare const crc8ebu: GenericCrc8; declare const crc8gsma: GenericCrc8; declare const crc8gsmb: GenericCrc8; declare const crc8hitag: GenericCrc8; declare const crc8icode: GenericCrc8; declare const crc8itu: GenericCrc8; declare const crc8legic: GenericCrc8; declare const crc8mad: GenericCrc8; declare const crc8maxim: GenericCrc8; declare const crc8nrsc5: GenericCrc8; declare const crc8opensafety: GenericCrc8; declare const crc8rohc: GenericCrc8; declare const crc8saej1850: GenericCrc8; declare const crc8wcdma: GenericCrc8; export { GenericCrc8, crc8, crc8autosar, crc8bluetooth, crc8cardx, crc8cdma2000, crc8darc, crc8dvbs2, crc8ebu, crc8gsma, crc8gsmb, crc8hitag, crc8icode, crc8itu, crc8legic, crc8mad, crc8maxim, crc8nrsc5, crc8opensafety, crc8rohc, crc8saej1850, crc8wcdma };