A hashing algorithm 

hash = 0;
while (klen--)
    hash = (hash * 33) + *key++;