29 #if defined(CRC_CCITT)
31 typedef unsigned short crc;
33 #define CRC_NAME "CRC-CCITT"
34 #define POLYNOMIAL 0x1021
35 #define INITIAL_REMAINDER 0xFFFF
36 #define FINAL_XOR_VALUE 0x0000
37 #define REFLECT_DATA FALSE
38 #define REFLECT_REMAINDER FALSE
39 #define CHECK_VALUE 0x29B1
43 typedef unsigned short crc;
45 #define CRC_NAME "CRC-16"
46 #define POLYNOMIAL 0x8005
47 #define INITIAL_REMAINDER 0x0000
48 #define FINAL_XOR_VALUE 0x0000
49 #define REFLECT_DATA TRUE
50 #define REFLECT_REMAINDER TRUE
51 #define CHECK_VALUE 0xBB3D
55 typedef unsigned long crc;
57 #define CRC_NAME "CRC-32"
58 #define POLYNOMIAL 0x04C11DB7
59 #define INITIAL_REMAINDER 0xFFFFFFFF
60 #define FINAL_XOR_VALUE 0xFFFFFFFF
61 #define REFLECT_DATA TRUE
62 #define REFLECT_REMAINDER TRUE
63 #define CHECK_VALUE 0xCBF43926
67 #error "One of CRC_CCITT, CRC16, or CRC32 must be #define'd."
73 crc crcSlow(
unsigned char const message[],
int nBytes);
74 crc crcFast(
unsigned char const message[],
int nBytes);
unsigned long crc
Definition: crc.h:55
crc crcSlow(unsigned char const message[], int nBytes)
Definition: crc.cpp:95
crc crcFast(unsigned char const message[], int nBytes)
Definition: crc.cpp:212
void crcInit(void)
Definition: crc.cpp:156