Go to the source code of this file.
Functions | |
uint32_t | util_hash_crc32 (const void *data, size_t size) |
| |
Variables | |
static const uint32_t | util_crc32_table [256] |
Definition in file u_hash.c.
uint32_t util_hash_crc32 | ( | const void * | data, | |
size_t | size | |||
) |
Definition at line 112 of file u_hash.c.
References util_crc32_table.
00113 { 00114 uint8_t *p = (uint8_t *)data; 00115 uint32_t crc = 0xffffffff; 00116 00117 while (size--) 00118 crc = util_crc32_table[(crc ^ *p++) & 0xff] ^ (crc >> 8); 00119 00120 return crc; 00121 }
const uint32_t util_crc32_table[256] [static] |