Function weak_hash

Source
fn weak_hash(key: u32, salt: u32, n: usize) -> usize
Expand description

Hash the 32 bit key into a value less than n, adding salt.

This is basically the weakest hash we can get away with that still distinguishes all the values.