Class: Devise::Encryptable::Encryptors::Base
- Inherits:
-
Object
- Object
- Devise::Encryptable::Encryptors::Base
show all
- Defined in:
- lib/devise/encryptable/encryptors/base.rb
Class Method Summary
collapse
Class Method Details
.compare(encrypted_password, password, stretches, salt, pepper) ⇒ Object
20
21
22
|
# File 'lib/devise/encryptable/encryptors/base.rb', line 20
def self.compare(encrypted_password, password, stretches, salt, pepper)
Devise.secure_compare(encrypted_password, digest(password, stretches, salt, pepper))
end
|
.digest(password, stretches, salt, pepper) ⇒ Object
12
13
14
|
# File 'lib/devise/encryptable/encryptors/base.rb', line 12
def self.digest(password, stretches, salt, pepper)
raise NotImplementedError
end
|
.salt(stretches) ⇒ Object
16
17
18
|
# File 'lib/devise/encryptable/encryptors/base.rb', line 16
def self.salt(stretches)
Devise.friendly_token[0,20]
end
|