25 #include <sys/types.h>
27 #include <openssl/rand.h>
45 sdbm(
const unsigned char * str,
size_t len)
47 unsigned long hash = 0;
49 for(; 0 < len; str++, len--)
50 hash = tolower(*str) + (hash << 6) + (hash << 16) - hash;
unsigned long sdbm(const unsigned char *str, size_t len)