Class: Devise::Encryptors::Sha1
- Inherits:
-
Object
- Object
- Devise::Encryptors::Sha1
- Defined in:
- lib/devise/encryptors/sha1.rb
Overview
Sha1
Uses the Sha1 hash algorithm to encrypt passwords.
Class Method Summary collapse
-
.digest(password, stretches, salt, pepper) ⇒ Object
Gererates a default password digest based on stretches, salt, pepper and the incoming password.
Class Method Details
.digest(password, stretches, salt, pepper) ⇒ Object
Gererates a default password digest based on stretches, salt, pepper and the incoming password.
18 19 20 21 22 |
# File 'lib/devise/encryptors/sha1.rb', line 18 def self.digest(password, stretches, salt, pepper) digest = pepper stretches.times { digest = self.secure_digest(salt, digest, password, pepper) } digest end |