Method: Devise::Encryptor.digest
- Defined in:
- lib/devise/encryptor.rb
.digest(klass, password) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/devise/encryptor.rb', line 7 def self.digest(klass, password) if klass.pepper.present? password = "#{password}#{klass.pepper}" end ::BCrypt::Password.create(password, cost: klass.stretches).to_s end |