From ccf71480726d53ea600815ae92475cece9eb2a90 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 15 Sep 2003 08:46:41 +0000 Subject: [PATCH] Initial revision --- hash.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 hash.h diff --git a/hash.h b/hash.h new file mode 100644 index 0000000..ac49cf9 --- /dev/null +++ b/hash.h @@ -0,0 +1,17 @@ +/* interface file for comparator hash function */ + +#ifdef CUSTOM_HASH +#define HASHSIZE 8 +typedef unsigned long long hashval_t; +#define hash_compare(s, t) ((s) - (t)) +#else +#define HASHSIZE 16 +typedef unsigned char hashval_t[HASHSIZE]; +#define hash_compare(s, t) memcmp((s), (t), HASHSIZE) +#endif + +void hash_init(void); +void hash_update(unsigned char *buffer, const int len); +void hash_complete(hashval_t *hp); + +/* hash.h ends */ -- 2.43.0