You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rw_config(:validates_format_of_email_field_options,value,{:with=>Authlogic::Regex.email,:message=>Proc.new{I18n.t('error_messages.email_invalid',:default=>"should look like an email address.")}})
# You can play around with the cost to get that perfect balance
32
32
# between performance and security. A default cost of 10 is the
@@ -46,11 +46,17 @@ module CryptoProviders
46
46
classBCrypt
47
47
class << self
48
48
# This is the :cost option for the BCrpyt library. The higher the cost the more secure it is and the longer is take the generate a hash. By default this is 10.
49
-
# Set this to whatever you want, play around with it to get that perfect balance between security and performance.
49
+
# Set this to any value >= the engine's minimum (currently 4), play around with it to get that perfect balance between security and performance.
50
50
defcost
51
51
@cost ||= 10
52
52
end
53
-
attr_writer:cost
53
+
54
+
defcost=(val)
55
+
ifval < ::BCrypt::Engine::MIN_COST
56
+
raiseArgumentError.new("Authlogic's bcrypt cost cannot be set below the engine's min cost (#{::BCrypt::Engine::MIN_COST})")
0 commit comments