Sha256: 467b8b271b1f330c8e1398d456e0a9ba5ce8c403450d6b4affde6cee96009bb6
Contents?: true
Size: 552 Bytes
Versions: 16
Compression:
Stored size: 552 Bytes
Contents
module Clearance module PasswordStrategies # Uses Argon2 to authenticate users and store encrypted passwords. module Argon2 require "argon2" def authenticated?(password) if encrypted_password.present? ::Argon2::Password.verify_password(password, encrypted_password) end end def password=(new_password) @password = new_password if new_password.present? self.encrypted_password = ::Argon2::Password.new.create(new_password) end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems