Class: Devise::Encryptable::Encryptors::Argon2
- Inherits:
-
Base
- Object
- Base
- Devise::Encryptable::Encryptors::Argon2
- Defined in:
- lib/devise/encryptable/encryptors/argon2.rb
Class Method Summary collapse
- .compare(encrypted_password:, password:, secret: nil) ⇒ Object
- .digest(password:, secret: nil) ⇒ Object
Class Method Details
.compare(encrypted_password:, password:, secret: nil) ⇒ Object
11 12 13 |
# File 'lib/devise/encryptable/encryptors/argon2.rb', line 11 def self.compare(encrypted_password:, password:, secret: nil) ::Argon2::Password.verify_password(password, encrypted_password, secret) end |
.digest(password:, secret: nil) ⇒ Object
7 8 9 |
# File 'lib/devise/encryptable/encryptors/argon2.rb', line 7 def self.digest(password:, secret: nil) ::Argon2::Password.create(password, secret: secret) end |