Module: ActiveModel::SecurePassword

Extended by:
ActiveSupport::Concern
Defined in:
lib/active_model/secure_password.rb

Defined Under Namespace

Modules: ClassMethods Classes: InstanceMethodsOnActivation

Constant Summary collapse

MAX_PASSWORD_LENGTH_ALLOWED =

BCrypt hash function can handle maximum 72 bytes, and if we pass password of length more than 72 bytes it ignores extra characters. Hence need to put a restriction on password length.

72

Class Attribute Summary collapse

Class Attribute Details

.min_costObject

:nodoc:



13
14
15
# File 'lib/active_model/secure_password.rb', line 13

def min_cost
  @min_cost
end