SHA-1 and other cryptographic hash functions should already give you a fairly even distribution, as a rule, they behave like a random function (which generates all outputs with equal probability).
So, just select the right number of bits from the function output to give you a number in the desired range.
You should study the literature on hash functions and hash tables in order to better understand the space so that you can make informed choices according to your requirements. You can start with Wikipedia or a textbook of algorithms such as the CLR . In the end, you need to move on to Knuth .
source share