Class: PasswordSalt
- Inherits:
-
String
- Object
- String
- PasswordSalt
- Defined in:
- lib/sixarm_ruby_password_salt.rb
Constant Summary collapse
- COUNT =
8- CHARS =
('a'..'z').to_a
Instance Method Summary collapse
-
#initialize ⇒ PasswordSalt
constructor
A new instance of PasswordSalt.
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 |