Class: PasswordSalt

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

Constant Summary collapse

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

Instance Method Summary collapse

Constructor Details

#initializePasswordSalt

Returns a new instance of PasswordSalt.



38
39
40
# File 'lib/webget_ruby_password_salt.rb', line 38

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