Module: Charmkit::Helpers::Crypt
- Defined in:
- lib/charmkit/helpers/crypt.rb
Instance Method Summary collapse
-
#gen_salt(min = 0, max = 20) ⇒ Object
Generate a password salt.
Instance Method Details
#gen_salt(min = 0, max = 20) ⇒ Object
Generate a password salt
8 9 10 |
# File 'lib/charmkit/helpers/crypt.rb', line 8 def gen_salt(min=0, max=20) (min...max).map { ('a'..'z').to_a[rand(26)] }.join end |