You can see this list of hash functions .
To implement a hash table (which, in your opinion, I suppose) you need a hash function with an avalanche effect to avoid too many hash collisions for similar input values.
, , , , (, 256 4). 32- ? , hash%tablesize ?
- (, md5, sha-1). - (, Pearson/Jenkins hash).
/* jenkins hash, copied from http://en.wikipedia.org/wiki/Jenkins_hash_function */
uint32_t jenkins_one_at_a_time_hash(char *key, size_t len)
{
uint32_t hash, i;
for(hash = i = 0; i < len; ++i)
{
hash += key[i];
hash += (hash << 10);
hash ^= (hash >> 6);
}
hash += (hash << 3);
hash ^= (hash >> 11);
hash += (hash << 15);
return hash;
}
: -, , - . , , ( ) 1, - .