Choosing the hash function
Want function to seem random.
Choice depends on key type and acceptable cost.
Sometime deliberate overflow.
Key = small integer
- For M prime h(K) = K mod M;
- For M non-prime
h(K) = floor(0.616161 * K) mod M;
h(K) = (16161*K mod 2^32) mod M;