Class: AdminAuth::Encryptor

Inherits:
Object
  • Object
show all
Defined in:
lib/admin_auth/encryptor.rb

Instance Method Summary collapse

Instance Method Details

#compare_passwords?(password, encrypted_password) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
# File 'lib/admin_auth/encryptor.rb', line 9

def compare_passwords?(password, encrypted_password)
  salt = encrypted_salt(encrypted_password)
  hashed_password = encrypted_password(password, salt)

  compare_passwords(hashed_password, encrypted_password)
end

#encrypt_password(password) ⇒ Object



5
6
7
# File 'lib/admin_auth/encryptor.rb', line 5

def encrypt_password(password)
  create_encrypted_password(password)
end