Skip to content

Instantly share code, notes, and snippets.

@flazz
Forked from anonymous/gist:143900
Created July 9, 2009 19:12
Show Gist options
  • Save flazz/143901 to your computer and use it in GitHub Desktop.
Save flazz/143901 to your computer and use it in GitHub Desktop.
md5 = Digest::MD5.new
md5 << File.read(filename)
puts [md5.hexdigest.scan(/../).pack("H2" * 16)].pack("m").chomp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment