roysathome.net/auth/cryptography.rb

7 lines
194 B
Ruby

require 'bcrypt'
def hash_password(password)
# Hash the password without using a salt
hashed_password = BCrypt::Password.create(password, salt: 'hello')
return hashed_password
end