2004-12-23 15:16:30 +02:00
|
|
|
#ifndef __FNV_HASH_H__
|
|
|
|
#define __FNV_HASH_H__
|
|
|
|
|
|
|
|
#include "hash.h"
|
|
|
|
|
2005-01-21 22:42:33 +02:00
|
|
|
typedef struct __fnv_state_t
|
2004-12-23 15:16:30 +02:00
|
|
|
{
|
|
|
|
CMPH_HASH hashfunc;
|
2005-01-21 22:42:33 +02:00
|
|
|
} fnv_state_t;
|
2004-12-23 15:16:30 +02:00
|
|
|
|
2005-01-21 22:42:33 +02:00
|
|
|
fnv_state_t *fnv_state_new();
|
|
|
|
cmph_uint32 fnv_hash(fnv_state_t *state, const char *k, cmph_uint32 keylen);
|
|
|
|
void fnv_state_dump(fnv_state_t *state, char **buf, cmph_uint32 *buflen);
|
2005-07-29 06:09:31 +03:00
|
|
|
fnv_state_t *fnv_state_copy(fnv_state_t *src_state);
|
2005-01-21 22:42:33 +02:00
|
|
|
fnv_state_t *fnv_state_load(const char *buf, cmph_uint32 buflen);
|
|
|
|
void fnv_state_destroy(fnv_state_t *state);
|
2004-12-23 15:16:30 +02:00
|
|
|
|
|
|
|
#endif
|