I want to take a hash range (md5 or sha1) and split it into n equal ranges.
For example, if m (num nodes) = 5, the entire hash range will be divided by 5, so that there will be an even distribution of key ranges. I would like n = 1 (node ββ1) to be from the beginning of the hash range to 1/5, 2 from 1/5 to 2/5, etc. To the end.
Basically, I need to have key ranges associated with each n, so when I pass the value, it knows which n will take care of that range.
I am new to hashing and a little unsure where I could start solving this for a project. Any help you could give would be great.
hash md5 sha1
noxtion
source share