Module: SecureRandom
Relationships & Source Files | |
Defined in: | activesupport/lib/active_support/core_ext/securerandom.rb |
Constant Summary
-
BASE36_ALPHABET =
# File 'activesupport/lib/active_support/core_ext/securerandom.rb', line 7("0".."9").to_a + ("a".."z").to_a
-
BASE58_ALPHABET =
# File 'activesupport/lib/active_support/core_ext/securerandom.rb', line 6("0".."9").to_a + ("A".."Z").to_a + ("a".."z").to_a - ["0", "O", "I", "l"]
Class Method Summary
-
.base36(n = 16)
See additional method definition at line 45.
-
.base58(n = 16)
See additional method definition at line 20.
Class Method Details
.base36(n = 16)
See additional method definition at line 45.
# File 'activesupport/lib/active_support/core_ext/securerandom.rb', line 49
def self.base36(n = 16) SecureRandom.alphanumeric(n, chars: BASE36_ALPHABET) end
.base58(n = 16)
See additional method definition at line 20.
# File 'activesupport/lib/active_support/core_ext/securerandom.rb', line 24
def self.base58(n = 16) SecureRandom.alphanumeric(n, chars: BASE58_ALPHABET) end