Last active
March 22, 2016 07:36
-
-
Save dteoh/0f4952437767cb0e7008 to your computer and use it in GitHub Desktop.
Get numeric value from hash digest
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' | |
key = 'the value to hash' | |
num = Digest::MD5.digest(key).unpack('L').first |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment