Sha256: 2eb617c6ff0cce7f2ce309181d94f7b949590205229aeb61aebfb2c6984be87d
Contents?: true
Size: 428 Bytes
Versions: 6
Compression:
Stored size: 428 Bytes
Contents
require 'bcrypt' require 'io/console' class PasswordHasher def self.encrypt_password print "Enter New Password: " password = STDIN.noecho(&:gets).chomp print "\nConfirm New Password: " if password == STDIN.noecho(&:gets).chomp then password_hash = BCrypt::Password.create(password) puts "\n" password_hash else puts "\n" warn 'Passwords did not match :(' end end end
Version data entries
6 entries across 6 versions & 1 rubygems