Method: SymmetricEncryption.random_password
- Defined in:
- lib/symmetric_encryption/symmetric_encryption.rb
.random_password(size = 22) ⇒ Object
Generate a Random password
298 299 300 301 |
# File 'lib/symmetric_encryption/symmetric_encryption.rb', line 298 def self.random_password(size = 22) require "securerandom" unless defined?(SecureRandom) SecureRandom.urlsafe_base64(size) end |