50 abData[1] = abData[0];
55 uCrc16 = (uCrc16 & 0x7fff) << 1;
62 uCrc16 ^= (abData[0] | (abData[1]<<8));
69 unsigned long ulCRC = i;
70 for (
int j = 8 ; j > 0; j-- ) {
72 ulCRC = ( ulCRC >> 1 ) ^ CRC32_POLYNOMIAL;
81 unsigned long ulCRC = 0;
82 while (
len-- != 0 ) {
83 unsigned long ulTemp1 = ( ulCRC >> 8 ) & 0x00FFFFFFL;
84 unsigned long ulTemp2 =
CRC32Value( ((
int) ulCRC ^ *
data++ ) & 0xff, gen_pol );
85 ulCRC = ulTemp1 ^ ulTemp2;
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
unsigned __int16 uint16_t
uint16_t BASE_IMPEXP compute_CRC16(const std::vector< uint8_t > &data, const uint16_t gen_pol=0x8005)
Computes the CRC16 checksum of a block of data.
unsigned long CRC32Value(int i, const uint32_t CRC32_POLYNOMIAL)
uint32_t BASE_IMPEXP compute_CRC32(const std::vector< uint8_t > &data, const uint32_t gen_pol=0xEDB88320L)
Computes the CRC32 checksum of a block of data.
unsigned __int32 uint32_t
GLsizei GLsizei GLenum GLenum const GLvoid * data