Module: Clearance::PasswordStrategies::Blowfish
- Defined in:
- lib/clearance/password_strategies/blowfish.rb
Instance Method Summary collapse
Instance Method Details
#authenticated?(password) ⇒ Boolean
6 7 8 |
# File 'lib/clearance/password_strategies/blowfish.rb', line 6 def authenticated?(password) encrypted_password == encrypt(password) end |
#password=(new_password) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/clearance/password_strategies/blowfish.rb', line 10 def password=(new_password) @password = new_password initialize_salt_if_necessary if new_password.present? self.encrypted_password = encrypt(new_password) end end |