Class: PasswordSalt

Inherits:
String
  • Object
show all
Defined in:
lib/sixarm_ruby_password_salt.rb

Constant Summary collapse

COUNT =
8
CHARS =
('a'..'z').to_a

Instance Method Summary collapse

Constructor Details

#initialize ⇒ PasswordSalt

Returns a new instance of PasswordSalt.



22
23
24
# File 'lib/sixarm_ruby_password_salt.rb', line 22

def initialize
 super(Array.new(COUNT){CHARS[SecureRandom.random_number(CHARS.size)]}.join)
end