Go to the source code of this file.
Functions | |
uint32_t | util_hash_crc32 (const void *data, size_t size) |
|
Definition in file u_hash.h.
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 }