Class: Devise::Encryptors::ClearanceSha1
- Inherits:
-
Object
- Object
- Devise::Encryptors::ClearanceSha1
- Defined in:
- lib/devise/encryptors/clearance_sha1.rb
Overview
ClearanceSha1
Simulates Clearance’s default encryption mechanism. Warning: it uses Devise’s pepper to port the concept of REST_AUTH_SITE_KEY Warning: it uses Devise’s stretches configuration to port the concept of REST_AUTH_DIGEST_STRETCHES
Class Method Summary collapse
-
.digest(password, stretches, salt, pepper) ⇒ Object
Gererates a default password digest based on salt, pepper and the incoming password.
Class Method Details
.digest(password, stretches, salt, pepper) ⇒ Object
Gererates a default password digest based on salt, pepper and the incoming password.
20 21 22 |
# File 'lib/devise/encryptors/clearance_sha1.rb', line 20 def self.digest(password, stretches, salt, pepper) Digest::SHA1.hexdigest("--#{salt}--#{password}--") end |