Skip to content

Instantly share code, notes, and snippets.

@dteoh dteoh/hash_to_numeric.rb
Last active Mar 22, 2016

Embed
What would you like to do?
Get numeric value from hash digest
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
You can’t perform that action at this time.