2004-12-23 15:16:30 +02:00
|
|
|
#ifndef __CMPH_HASH_H__
|
|
|
|
#define __CMPH_HASH_H__
|
|
|
|
|
|
|
|
#include "cmph_types.h"
|
|
|
|
|
2005-01-21 22:42:33 +02:00
|
|
|
typedef union __hash_state_t hash_state_t;
|
2004-12-23 15:16:30 +02:00
|
|
|
|
2005-01-21 22:42:33 +02:00
|
|
|
hash_state_t *hash_state_new(CMPH_HASH, cmph_uint32 hashsize);
|
|
|
|
cmph_uint32 hash(hash_state_t *state, const char *key, cmph_uint32 keylen);
|
|
|
|
void hash_state_dump(hash_state_t *state, char **buf, cmph_uint32 *buflen);
|
|
|
|
hash_state_t *hash_state_load(const char *buf, cmph_uint32 buflen);
|
|
|
|
void hash_state_destroy(hash_state_t *state);
|
2004-12-23 15:16:30 +02:00
|
|
|
|
|
|
|
#endif
|