mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Merge pull request #2913 from petervandenabeele/master
Note that the cost of bcrypt grows dramatically with number of stretches
This commit is contained in:
commit
71eb6176c3
1 changed files with 3 additions and 1 deletions
|
@ -95,7 +95,9 @@ Devise.setup do |config|
|
|||
#
|
||||
# Limiting the stretches to just one in testing will increase the performance of
|
||||
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
||||
# a value less than 10 in other environments.
|
||||
# a value less than 10 in other environments. Note that, for bcrypt (the default
|
||||
# encryptor), the cost increases exponentially with the number of stretches (e.g.
|
||||
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
|
||||
config.stretches = Rails.env.test? ? 1 : 10
|
||||
|
||||
# Setup a pepper to generate the encrypted password.
|
||||
|
|
Loading…
Reference in a new issue