(java) - Hash function to distribute Strings uniformly in a given range?
问题 So ... I'm looking for a hash function that -- assuming no input skew -- will distribute nonempty Strings of (up to) 16 bytes "reasonably uniformly" onto a range [0..n] where n is user input but does not change over time. And I should be able to argue why the function should provide that "resonably uniform" distribution. In the end, all I need is a Java implementation of the hash function for use in a server and a reason "why" this hash function is suitable. So I'm looking less for "perfect