From bb0e7b5272e082c73f7817a62bf69dab6538426c Mon Sep 17 00:00:00 2001 From: Tobias Eidelpes Date: Sun, 19 Apr 2020 15:35:14 +0200 Subject: [PATCH] Lower number of stretches performed with SHA512 --- config/initializers/devise.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 6fee07f..d7752ce 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -111,7 +111,7 @@ Devise.setup do |config| # a value less than 10 in other environments. Note that, for bcrypt (the default # algorithm), 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 : 20 + config.stretches = Rails.env.test? ? 1 : 10 # Set up a pepper to generate the hashed password. # config.pepper = '70d5aace7d4050ced64a822bb49136b1bb2c7238e652c90161da45bcebe0cc49973f3736ee192240ed46eba84e6731595baef18def2a969397ab76bc120897f8'