Class: Devise::Encryptors::Sha512
- Defined in:
- lib/devise/encryptors/sha512.rb
Overview
Sha512
Uses the Sha512 hash algorithm to encrypt passwords.
Class Method Summary collapse
-
.digest(password, stretches, salt, pepper) ⇒ Object
Gererates a default password digest based on salt, pepper and the incoming password.
Methods inherited from Base
Class Method Details
.digest(password, stretches, salt, pepper) ⇒ Object
Gererates a default password digest based on salt, pepper and the incoming password.
11 12 13 14 15 |
# File 'lib/devise/encryptors/sha512.rb', line 11 def self.digest(password, stretches, salt, pepper) digest = pepper stretches.times { digest = self.secure_digest(salt, digest, password, pepper) } digest end |