title: (java) - Hash function to distribute Strings uniformly in a given range?
body: <p>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 <code>[0..n]</code> where <code>n</code> is user input but does not change over time.</p>
  
  <p><strong><em>And</em></strong> I should be able to argue <em>why</em> the function should provide that "resonably uniform" distribution.</p>
  
  <p>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 uniform distribution" (if such a thing even exists) and more for "reasonably fast".</p>
  
  <p>Still, I've never been much of a mathematician, so ...</p>
  
  <ul>
  <li>is there some native Java functionality that would provide such a hash?</li>
  <li>or any suggestion on how to come up with such a hash function?</li>
  </ul>