djb2 Hash Generator - Daniel Bernstein String Hash Online
Generate djb2 hashes for string hashing. Simple, fast algorithm by Daniel J. Bernstein. Perfect for hash tables. Free online djb2 calculator.
Algorithm
unsigned long djb2(char *str) {
unsigned long hash = 5381;
int c;
while ((c = *str++))
hash = ((hash << 5) + hash) + c;
/* hash * 33 + c */
return hash;
}0x
0x
Decimal (32-bit)
-
Modulo 1000
-
Hash Info
Algorithm: djb2
Initial: 5381
Multiplier: 33