* src/usr.bin/cksum/crc32.c.
*/
-#include "common.h"
+#include <libhashkit/common.h>
static const uint32_t crc32tab[256] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
};
-uint32_t hashkit_crc32(const char *key, size_t key_length)
+uint32_t hashkit_crc32(const char *key, size_t key_length, void *context)
{
uint64_t x;
uint32_t crc= UINT32_MAX;
+ (void)context;
for (x= 0; x < key_length; x++)
crc= (crc >> 8) ^ crc32tab[(crc ^ (uint64_t)key[x]) & 0xff];