Created
October 14, 2015 19:05
-
-
Save Tombert/5a73606f308c3d0b027b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'digest/md5' | |
def hashKey(key) | |
md5 = Digest::MD5.hexdigest("bobby" | |
int_md5 = md5.to_i(16) | |
return int_md5 % max_length | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment