class Gargoyle::Password

Public Class Methods

compare?(hashed_password, unhashed_password) click to toggle source
# File lib/gargoyle/password.rb, line 10
def compare?(hashed_password, unhashed_password)
  return unless hashed_password

  BCrypt::Password.new(hashed_password) == unhashed_password
end
hashing(password) click to toggle source
# File lib/gargoyle/password.rb, line 6
def hashing(password)
  BCrypt::Password.create(password)
end