2 bool CRC32::calculated =
false;
3 u_int32_t CRC32::crc_table[256];
21 u_int32_t crc = 0xFFFFFFFF;
22 for (
unsigned int i = 0; i < size; i++)
24 crc = crc_table[(crc ^ (data[i])) & 0xFF] ^ (crc >> 8);
31 void CRC32::calcCrcTable()
33 const u_int32_t CRCPOLY = 0xEDB88320;
35 for (
register unsigned int i = 0; i < 256; i++)
38 for (
register int j = 8; j > 0; j--)
41 t = (t >> 1) ^ CRCPOLY;