2004-12-23 15:16:30 +02:00
|
|
|
#ifndef __SDBM_HASH_H__
|
|
|
|
#define __SDBM_HASH_H__
|
|
|
|
|
|
|
|
#include "hash.h"
|
|
|
|
|
2005-01-21 22:42:33 +02:00
|
|
|
typedef struct __sdbm_state_t
|
2004-12-23 15:16:30 +02:00
|
|
|
{
|
|
|
|
CMPH_HASH hashfunc;
|
2005-01-21 22:42:33 +02:00
|
|
|
} sdbm_state_t;
|
2004-12-23 15:16:30 +02:00
|
|
|
|
2005-01-21 22:42:33 +02:00
|
|
|
sdbm_state_t *sdbm_state_new();
|
|
|
|
cmph_uint32 sdbm_hash(sdbm_state_t *state, const char *k, cmph_uint32 keylen);
|
|
|
|
void sdbm_state_dump(sdbm_state_t *state, char **buf, cmph_uint32 *buflen);
|
|
|
|
sdbm_state_t *sdbm_state_load(const char *buf, cmph_uint32 buflen);
|
|
|
|
void sdbm_state_destroy(sdbm_state_t *state);
|
2004-12-23 15:16:30 +02:00
|
|
|
|
|
|
|
#endif
|