mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
2aa1d2f3b7
The chance of someone to successfully guess a random token in the website is: (number_of_users / 2388636399360109977557402041718133080829429159844757507642063199359529632522467783435119230976)
20 lines
No EOL
524 B
Ruby
20 lines
No EOL
524 B
Ruby
module Devise
|
|
# Implements a way of adding different encryptions.
|
|
# The class should implement a self.digest method that taks the following params:
|
|
# - password
|
|
# - stretches: the number of times the encryption will be applied
|
|
# - salt: the password salt as defined by devise
|
|
# - pepper: Devise config option
|
|
#
|
|
module Encryptors
|
|
class Base
|
|
def self.digest
|
|
raise NotImplemented
|
|
end
|
|
|
|
def self.salt(stretches)
|
|
Devise.friendly_token[0,20]
|
|
end
|
|
end
|
|
end
|
|
end |