Hash Functions
The page describes and provides C source code for two simple hash functions for strings: the djb2 hash (a variant of Dan Bernstein's algorithm starting with hash 5381) and the sdbm hash (used in the sdbm database library). Both functions are presented as effective, general-purpose hashing algorithms for string keys.