Go to the source code of this file.
|
enum | RzCrcPresets {
CRC_PRESET_8_SMBUS = 0
, CRC_PRESET_CRC8_CDMA2000
, CRC_PRESET_CRC8_DARC
, CRC_PRESET_CRC8_DVB_S2
,
CRC_PRESET_CRC8_EBU
, CRC_PRESET_CRC8_ICODE
, CRC_PRESET_CRC8_ITU
, CRC_PRESET_CRC8_MAXIM
,
CRC_PRESET_CRC8_ROHC
, CRC_PRESET_CRC8_WCDMA
, CRC_PRESET_15_CAN
, CRC_PRESET_16
,
CRC_PRESET_16_CITT
, CRC_PRESET_16_USB
, CRC_PRESET_16_HDLC
, CRC_PRESET_CRC16_AUG_CCITT
,
CRC_PRESET_CRC16_BUYPASS
, CRC_PRESET_CRC16_CDMA2000
, CRC_PRESET_CRC16_DDS110
, CRC_PRESET_CRC16_DECT_R
,
CRC_PRESET_CRC16_DECT_X
, CRC_PRESET_CRC16_DNP
, CRC_PRESET_CRC16_EN13757
, CRC_PRESET_CRC16_GENIBUS
,
CRC_PRESET_CRC16_MAXIM
, CRC_PRESET_CRC16_MCRF4XX
, CRC_PRESET_CRC16_RIELLO
, CRC_PRESET_CRC16_T10_DIF
,
CRC_PRESET_CRC16_TELEDISK
, CRC_PRESET_CRC16_TMS37157
, CRC_PRESET_CRCA
, CRC_PRESET_CRC16_KERMIT
,
CRC_PRESET_CRC16_MODBUS
, CRC_PRESET_CRC16_X25
, CRC_PRESET_CRC16_XMODEM
, CRC_PRESET_24
,
CRC_PRESET_32
, CRC_PRESET_32_ECMA_267
, CRC_PRESET_32C
, CRC_PRESET_CRC32_BZIP2
,
CRC_PRESET_CRC32D
, CRC_PRESET_CRC32_MPEG2
, CRC_PRESET_CRC32_POSIX
, CRC_PRESET_CRC32Q
,
CRC_PRESET_CRC32_JAMCRC
, CRC_PRESET_CRC32_XFER
, CRC_PRESET_CRC64
, CRC_PRESET_CRC64_ECMA182
,
CRC_PRESET_CRC64_WE
, CRC_PRESET_CRC64_XZ
, CRC_PRESET_CRC64_ISO
, CRC_PRESET_SIZE
} |
|
◆ UTCRC_C
◆ utcrc
Definition at line 9 of file crca.h.
◆ RzCrcPresets
Enumerator |
---|
CRC_PRESET_8_SMBUS | |
CRC_PRESET_CRC8_CDMA2000 | |
CRC_PRESET_CRC8_DARC | |
CRC_PRESET_CRC8_DVB_S2 | |
CRC_PRESET_CRC8_EBU | |
CRC_PRESET_CRC8_ICODE | |
CRC_PRESET_CRC8_ITU | |
CRC_PRESET_CRC8_MAXIM | |
CRC_PRESET_CRC8_ROHC | |
CRC_PRESET_CRC8_WCDMA | |
CRC_PRESET_15_CAN | |
CRC_PRESET_16 | |
CRC_PRESET_16_CITT | |
CRC_PRESET_16_USB | |
CRC_PRESET_16_HDLC | |
CRC_PRESET_CRC16_AUG_CCITT | |
CRC_PRESET_CRC16_BUYPASS | |
CRC_PRESET_CRC16_CDMA2000 | |
CRC_PRESET_CRC16_DDS110 | |
CRC_PRESET_CRC16_DECT_R | |
CRC_PRESET_CRC16_DECT_X | |
CRC_PRESET_CRC16_DNP | |
CRC_PRESET_CRC16_EN13757 | |
CRC_PRESET_CRC16_GENIBUS | |
CRC_PRESET_CRC16_MAXIM | |
CRC_PRESET_CRC16_MCRF4XX | |
CRC_PRESET_CRC16_RIELLO | |
CRC_PRESET_CRC16_T10_DIF | |
CRC_PRESET_CRC16_TELEDISK | |
CRC_PRESET_CRC16_TMS37157 | |
CRC_PRESET_CRCA | |
CRC_PRESET_CRC16_KERMIT | |
CRC_PRESET_CRC16_MODBUS | |
CRC_PRESET_CRC16_X25 | |
CRC_PRESET_CRC16_XMODEM | |
CRC_PRESET_24 | |
CRC_PRESET_32 | |
CRC_PRESET_32_ECMA_267 | |
CRC_PRESET_32C | |
CRC_PRESET_CRC32_BZIP2 | |
CRC_PRESET_CRC32D | |
CRC_PRESET_CRC32_MPEG2 | |
CRC_PRESET_CRC32_POSIX | |
CRC_PRESET_CRC32Q | |
CRC_PRESET_CRC32_JAMCRC | |
CRC_PRESET_CRC32_XFER | |
CRC_PRESET_CRC64 | |
CRC_PRESET_CRC64_ECMA182 | |
CRC_PRESET_CRC64_WE | |
CRC_PRESET_CRC64_XZ | |
CRC_PRESET_CRC64_ISO | |
CRC_PRESET_SIZE | |
Definition at line 12 of file crca.h.
@ CRC_PRESET_CRC16_RIELLO
@ CRC_PRESET_CRC16_TELEDISK
@ CRC_PRESET_CRC16_CDMA2000
@ CRC_PRESET_CRC8_CDMA2000
@ CRC_PRESET_CRC16_AUG_CCITT
@ CRC_PRESET_CRC16_MCRF4XX
@ CRC_PRESET_CRC16_GENIBUS
@ CRC_PRESET_CRC32_JAMCRC
@ CRC_PRESET_CRC16_DECT_R
@ CRC_PRESET_CRC16_DDS110
@ CRC_PRESET_CRC16_DECT_X
@ CRC_PRESET_CRC16_MODBUS
@ CRC_PRESET_CRC16_KERMIT
@ CRC_PRESET_CRC64_ECMA182
@ CRC_PRESET_CRC16_BUYPASS
@ CRC_PRESET_CRC16_TMS37157
@ CRC_PRESET_CRC16_T10_DIF
@ CRC_PRESET_CRC16_XMODEM
@ CRC_PRESET_CRC16_EN13757
◆ crc_final()
◆ crc_init_custom()
Definition at line 8 of file crca.c.
11 ctx->reflect = reflect;
◆ crc_init_preset()
◆ crc_update()
Definition at line 16 of file crca.c.
21 for (
i = 0;
i < sz;
i++) {
24 for (j = 0; j < 4; j++) {
25 if (((
d >> j) ^ (
d >> (7 - j))) & 1) {
26 d ^= (1 << j) ^ (1 << (7 - j));
30 crc ^=
d << (
ctx->size - 8);
31 for (j = 0; j < 8; j++) {
32 crc = ((crc >> (
ctx->size - 1)) & 1 ?
ctx->poly : 0) ^ (crc << 1);
References d, and i.
Referenced by plugin_crca_update(), and rz_hash_crc_preset().