Module: SecurePassword
- Defined in:
- lib/secure_password.rb
Instance Method Summary collapse
Instance Method Details
#authenticate(unencrypted) ⇒ Object
6 7 8 |
# File 'lib/secure_password.rb', line 6 def authenticate(unencrypted) BCrypt::Password.new(password_digest) == unencrypted end |
#password=(unencrypted) ⇒ Object
10 11 12 |
# File 'lib/secure_password.rb', line 10 def password=(unencrypted) self.password_digest = BCrypt::Password.create(unencrypted) end |