Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created September 22, 2015 23:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c010a8b20de83264b8fb to your computer and use it in GitHub Desktop.
Save anonymous/c010a8b20de83264b8fb to your computer and use it in GitHub Desktop.
require 'io/console'
require 'digest/md5'
require 'digest/sha1'
print "Enter password: "
pass = STDIN.noecho(&:gets)
print "\nMD5: #{Digest::MD5.hexdigest(pass) }\nSHA1: #{Digest::SHA1.hexdigest(pass) }\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment