Skip to Content Skip to Search
Methods
B

Constants

BASE32_ALPHABET = ("0".."9").to_a + ("A".."Z").to_a - ["I", "L", "O", "U"]
 
BASE36_ALPHABET = ("0".."9").to_a + ("a".."z").to_a
 
BASE58_ALPHABET = ("0".."9").to_a + ("A".."Z").to_a + ("a".."z").to_a - ["0", "O", "I", "l"]
 

Class Public methods

base32(n = 16)

# File activesupport/lib/active_support/core_ext/securerandom.rb, line 71
def self.base32(n = 16)
  alphanumeric(n, chars: BASE32_ALPHABET)
end

base36(n = 16)

# File activesupport/lib/active_support/core_ext/securerandom.rb, line 46
def self.base36(n = 16)
  alphanumeric(n, chars: BASE36_ALPHABET)
end

base58(n = 16)

# File activesupport/lib/active_support/core_ext/securerandom.rb, line 21
def self.base58(n = 16)
  alphanumeric(n, chars: BASE58_ALPHABET)
end