Crate crc16 [] [src]

crc16

Installation

[dependencies]
crc16 = "*"

Usage

use crc16::*;

// In one pass
assert_eq!(State::<ARC>::calculate(b"123456789"), 0xBB3D);

// Incrementally
let mut state = State::<ARC>::new();
state.update(b"12345");
state.update(b"6789");
assert_eq!(state.get(), 0xBB3D);

Structs

State

State of crc calculation.

Enums

ARC

ARC poly=0x8005 check=0xbb3d

AUG_CCITT

CRC-16/AUG-CCITT poly=0x1021 check=0xe5cc

BUYPASS

CRC-16/BUYPASS poly=0x8005 check=0xfee8

CCITT_FALSE

CRC-16/CCITT-FALSE poly=0x1021 check=0x29b1

CDMA2000

CRC-16/CDMA2000 poly=0xc867 check=0x4c06

CRC_A

CRC-A poly=0x1021 check=0xbf05

DDS_110

CRC-16/DDS-110 poly=0x1021 check=0x29b1

DECT_R

CRC-16/DECT-R poly=0x0589 check=0x007e

DECT_X

CRC-16/DECT-X poly=0x0589 check=0x007f

DNP

CRC-16/DNP poly=0x3d65 check=0xea82

EN_13757

CRC-16/EN-13757 poly=0x3d65 check=0xc2b7

GENIBUS

CRC-16/GENIBUS poly=0x1021 check=0xd64e

KERMIT

KERMIT poly=0x1021 check=0x2189

MAXIM

CRC-16/MAXIM poly=0x8005 check=0x44c2

MCRF4XX

CRC-16/MCRF4XX poly=0x1021 check=0x6f91

MODBUS

MODBUS poly=0x8005 check=0x4b37

RIELLO

CRC-16/RIELLO poly=0x1021 check=0x63d0

T10_DIF

CRC-16/T10-DIF poly=0x8bb7 check=0xd0db

TELEDISK

CRC-16/TELEDISK poly=0xa097 check=0x0fb3

TMS37157

CRC-16/TMS37157 poly=0x1021 check=0x26b1

USB

CRC-16/USB poly=0x8005 check=0xb4c8

XMODEM

XMODEM poly=0x1021 check=0x31c3

X_25

X-25 poly=0x1021 check=0x906e

Traits

CrcType