class method
SecureRandom.alphanumeric
alphanumeric(n = nil, chars: ALPHANUMERIC)
lib/securerandom.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/securerandom.rb, line 54
def alphanumeric(n = nil, chars: ALPHANUMERIC)
n = 16 if n.nil?
choose(chars, n)
end
Compatibility methods for Ruby 3.2, we can remove this after dropping to support Ruby 3.2