prime.o random.o realloc.o regex.o timer.o url.o wildmatch.o \
wordsplit.o str_ctype.o str_upper.o bucket.o conf.o object.o sorter.o \
finger.o proctitle.o ipaccess.o profile.o bitsig.o randomkey.o \
- hash-string.o hash-istring.o custom.o base224.o str_hash.o fb-temp.o
+ hash-string.o hash-istring.o hash-block.o custom.o base224.o str_hash.o fb-temp.o
obj/lib/libsh.a: $(addprefix obj/lib/,$(SHLIB_OBJS))
--- /dev/null
+/*
+ * Sherlock Library -- Block Hash Function
+ *
+ * (c) 2002 Martin Mares <mj@ucw.cz>
+ */
+
+#include "lib/lib.h"
+#include "lib/hashfunc.h"
+
+uns
+hash_block(byte *k, uns len)
+{
+ uns h = len;
+ while (len--)
+ h = h*37 + *k++;
+ return h;
+}
uns hash_string(byte *x);
uns hash_string_nocase(byte *x);
static inline uns hash_int(uns x) { return 6442450967*x; }
+uns hash_block(byte *x, uns len);
#endif