-
Notifications
You must be signed in to change notification settings - Fork 1
/
ListOfPolynomials.h
89 lines (86 loc) · 6.8 KB
/
ListOfPolynomials.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*This file is part of CRCcalculation_Library which is a free software : you can redistribute itand /or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
CRCcalculation_Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU General Public License for more details; https://www.gnu.org/licenses/
https://github.com/tanel312 www.tanels.com [email protected]
*/
#pragma once
// parameters of the various algorithms in use taken from: https://reveng.sourceforge.io/crc-catalogue/all.htm
CRCparameters CRCparams[] = {
8, 0x2f, 0xff, false, false, 0xff, 0xdf, 0x42, "CRC-8/AUTOSAR"
, 8, 0xa7, 0x00, false, true, 0x00, 0x26, 0x00, "CRC-8/BLUETOOTH"
, 8, 0x9b, 0xff, false, false, 0x00, 0xda, 0x00, "CRC-8/CDMA2000"
, 8, 0x39, 0x00, false, true, 0x00, 0x15, 0x00, "CRC-8/DARC"
, 8, 0xd5, 0x00, false, false, 0x00, 0xbc, 0x00, "CRC-8/DVB-S2"
, 8, 0x1d, 0x00, false, false, 0x00, 0x37, 0x00, "CRC-8/GSM-A"
, 8, 0x49, 0x00, false, false, 0xff, 0x94, 0x53, "CRC-8/GSM-B"
, 8, 0x1d, 0xff, false, false, 0x00, 0xb4, 0x00, "CRC-8/HITAG"
, 8, 0x07, 0x00, false, false, 0x55, 0xa1, 0xac, "CRC-8/I-432-1"
, 8, 0x1d, 0xfd, false, false, 0x00, 0x7e, 0x00, "CRC-8/I-CODE"
, 8, 0x9b, 0x00, false, false, 0x00, 0xea, 0x00, "CRC-8/LTE"
, 8, 0x31, 0x00, false, true, 0x00, 0xa1, 0x00, "CRC-8/MAXIM-DOW"
, 8, 0x1d, 0xc7, false, false, 0x00, 0x99, 0x00, "CRC-8/MIFARE-MAD"
, 8, 0x31, 0xff, false, false, 0x00, 0xf7, 0x00, "CRC-8/NRSC-5"
, 8, 0x2f, 0x00, false, false, 0x00, 0x3e, 0x00, "CRC-8/OPENSAFETY"
, 8, 0x07, 0xff, false, true, 0x00, 0xd0, 0x00, "CRC-8/ROHC"
, 8, 0x1d, 0xff, false, false, 0xff, 0x4b, 0xc4, "CRC-8/SAE-J1850"
, 8, 0x07, 0x00, false, false, 0x00, 0xf4, 0x00, "CRC-8/SMBUS"
, 8, 0x1d, 0xff, false, true, 0x00, 0x97, 0x00, "CRC-8/TECH-3250"
, 8, 0x9b, 0x00, false, true, 0x00, 0x25, 0x00, "CRC-8/WCDMA"
, 16, 0x8005, 0x0000, false, true, 0x0000, 0xbb3d, 0x0000, "CRC-16/ARC"
, 16, 0xc867, 0xffff, false, false, 0x0000, 0x4c06, 0x0000, "CRC-16/CDMA2000"
, 16, 0x8005, 0xffff, false, false, 0x0000, 0xaee7, 0x0000, "CRC-16/CMS"
, 16, 0x8005, 0x800d, false, false, 0x0000, 0x9ecf, 0x0000, "CRC-16/DDS-110"
, 16, 0x0589, 0x0000, false, false, 0x0001, 0x007e, 0x0589, "CRC-16/DECT-R"
, 16, 0x0589, 0x0000, false, false, 0x0000, 0x007f, 0x0000, "CRC-16/DECT-X"
, 16, 0x3d65, 0x0000, false, true, 0xffff, 0xea82, 0x66c5, "CRC-16/DNP"
, 16, 0x3d65, 0x0000, false, false, 0xffff, 0xc2b7, 0xa366, "CRC-16/EN-13757"
, 16, 0x1021, 0xffff, false, false, 0xffff, 0xd64e, 0x1d0f, "CRC-16/GENIBUS"
, 16, 0x1021, 0x0000, false, false, 0xffff, 0xce3c, 0x1d0f, "CRC-16/GSM"
, 16, 0x1021, 0xffff, false, false, 0x0000, 0x29b1, 0x0000, "CRC-16/IBM-3740"
, 16, 0x1021, 0xffff, false, true, 0xffff, 0x906e, 0xf0b8, "CRC-16/IBM-SDLC"
, 16, 0x1021, 0xc6c6, true, true, 0x0000, 0xbf05, 0x0000, "CRC-16/ISO-IEC-14443-3-A"
, 16, 0x1021, 0x0000, false, true, 0x0000, 0x2189, 0x0000, "CRC-16/KERMIT"
, 16, 0x6f63, 0x0000, false, false, 0x0000, 0xbdf4, 0x0000, "CRC-16/LJ1200"
, 16, 0x8005, 0x0000, false, true, 0xffff, 0x44c2, 0xb001, "CRC-16/MAXIM-DOW"
, 16, 0x1021, 0xffff, false, true, 0x0000, 0x6f91, 0x0000, "CRC-16/MCRF4XX"
, 16, 0x8005, 0xffff, false, true, 0x0000, 0x4b37, 0x0000, "CRC-16/MODBUS"
, 16, 0x080b, 0xffff, false, true, 0x0000, 0xa066, 0x0000, "CRC-16/NRSC-5"
, 16, 0x5935, 0x0000, false, false, 0x0000, 0x5d38, 0x0000, "CRC-16/OPENSAFETY-A"
, 16, 0x755b, 0x0000, false, false, 0x0000, 0x20fe, 0x0000, "CRC-16/OPENSAFETY-B"
, 16, 0x1dcf, 0xffff, false, false, 0xffff, 0xa819, 0xe394, "CRC-16/PROFIBUS"
, 16, 0x1021, 0xb2aa, true, true, 0x0000, 0x63d0, 0x0000, "CRC-16/RIELLO"
, 16, 0x1021, 0x1d0f, false, false, 0x0000, 0xe5cc, 0x0000, "CRC-16/SPI-FUJITSU"
, 16, 0x8bb7, 0x0000, false, false, 0x0000, 0xd0db, 0x0000, "CRC-16/T10-DIF"
, 16, 0xa097, 0x0000, false, false, 0x0000, 0x0fb3, 0x0000, "CRC-16/TELEDISK"
, 16, 0x1021, 0x89ec, true, true, 0x0000, 0x26b1, 0x0000, "CRC-16/TMS37157"
, 16, 0x8005, 0x0000, false, false, 0x0000, 0xfee8, 0x0000, "CRC-16/UMTS"
, 16, 0x8005, 0xffff, false, true, 0xffff, 0xb4c8, 0xb001, "CRC-16/USB"
, 16, 0x1021, 0x0000, false, false, 0x0000, 0x31c3, 0x0000, "CRC-16/XMODEM"
, 24, 0x00065b, 0x555555, true, true, 0x000000, 0xc25a56, 0x000000, "CRC-24/BLE"
, 24, 0x5d6dcb, 0xfedcba, false, false, 0x000000, 0x7979bd, 0x000000, "CRC-24/FLEXRAY-A"
, 24, 0x5d6dcb, 0xabcdef, false, false, 0x000000, 0x1f23b8, 0x000000, "CRC-24/FLEXRAY-B"
, 24, 0x328b63, 0xffffff, false, false, 0xffffff, 0xb4f3e6, 0x144e63, "CRC-24/INTERLAKEN"
, 24, 0x864cfb, 0x000000, false, false, 0x000000, 0xcde703, 0x000000, "CRC-24/LTE-A"
, 24, 0x800063, 0x000000, false, false, 0x000000, 0x23ef52, 0x000000, "CRC-24/LTE-B"
, 24, 0x864cfb, 0xb704ce, false, false, 0x000000, 0x21cf02, 0x000000, "CRC-24/OPENPGP"
, 24, 0x800063, 0xffffff, false, false, 0xffffff, 0x200fa5, 0x800fe3, "CRC-24/OS-9"
, 32, 0x814141ab, 0x00000000, false, false, 0x00000000, 0x3010bf7f, 0x00000000, "CRC-32/AIXM"
, 32, 0xf4acfb13, 0xffffffff, false, true, 0xffffffff, 0x1697d06a, 0x904cddbf, "CRC-32/AUTOSAR"
, 32, 0xa833982b, 0xffffffff, false, true, 0xffffffff, 0x87315576, 0x45270551, "CRC-32/BASE91-D"
, 32, 0x04c11db7, 0xffffffff, false, false, 0xffffffff, 0xfc891918, 0xc704dd7b, "CRC-32/BZIP2"
, 32, 0x8001801b, 0x00000000, false, true, 0x00000000, 0x6ec2edc4, 0x00000000, "CRC-32/CD-ROM-EDC"
, 32, 0x04c11db7, 0x00000000, false, false, 0xffffffff, 0x765e7680, 0xc704dd7b, "CRC-32/CKSUM"
, 32, 0x1edc6f41, 0xffffffff, false, true, 0xffffffff, 0xe3069283, 0xb798b438, "CRC-32/ISCSI"
, 32, 0x04c11db7, 0xffffffff, false, true, 0xffffffff, 0xcbf43926, 0xdebb20e3, "CRC-32/ISO-HDLC"
, 32, 0x04c11db7, 0xffffffff, false, true, 0x00000000, 0x340bc6d9, 0x00000000, "CRC-32/JAMCRC"
, 32, 0x741b8cd7, 0xffffffff, false, true, 0x00000000, 0xd2c22f51, 0x00000000, "CRC-32/MEF"
, 32, 0x04c11db7, 0xffffffff, false, false, 0x00000000, 0x0376e6e7, 0x00000000, "CRC-32/MPEG-2"
, 32, 0x000000af, 0x00000000, false, false, 0x00000000, 0xbd0be338, 0x00000000, "CRC-32/XFER"
, 40, 0x0004820009, 0x0000000000, false, false, 0xffffffffff, 0xd4164fc646, 0xc4ff8071ff, "CRC-40/GSM"
, 64, 0x42f0e1eba9ea3693, 0x0000000000000000, false, false, 0x0000000000000000, 0x6c40df5f0b497347, 0x0000000000000000, "CRC-64/ECMA-182"
, 64, 0x000000000000001b, 0xffffffffffffffff, false, true, 0xffffffffffffffff, 0xb90956c775a41001, 0x5300000000000000, "CRC-64/GO-ISO"
, 64, 0x259c84cba6426349, 0xffffffffffffffff, false, true, 0x0000000000000000, 0x75d4b74f024eceea, 0x0000000000000000, "CRC-64/MS"
, 64, 0x42f0e1eba9ea3693, 0xffffffffffffffff, false, false, 0xffffffffffffffff, 0x62ec59e3f1a4f00a, 0xfcacbebd5931a992, "CRC-64/WE"
, 64, 0x42f0e1eba9ea3693, 0xffffffffffffffff, false, true, 0xffffffffffffffff, 0x995dc9bbdf1939fa, 0x49958c9abd7d353f, "CRC-64/XZ"
};