Skip to content

Instantly share code, notes, and snippets.

Created July 9, 2009 19:11
Show Gist options
  • Save anonymous/143900 to your computer and use it in GitHub Desktop.
Save anonymous/143900 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