Module: Base32

Defined in:
lib/base32.rb,
lib/base32/chunk.rb,
lib/base32/random.rb,
lib/base32/decoder.rb,
lib/base32/encoder.rb,
lib/base32/version.rb,
lib/base32/alphabet.rb

Overview

Module for encoding and decoding in Base32 per RFC 3548

Defined Under Namespace

Classes: Alphabet, Chunk, Decoder, Encoder, Random

Constant Summary collapse

VERSION =
'0.4.2'

Class Method Summary collapse

Class Method Details

.decode(str, alphabet = Base32::Alphabet::CHARS) ⇒ Object



13
14
15
# File 'lib/base32.rb', line 13

def self.decode(str, alphabet = Base32::Alphabet::CHARS)
  Decoder.new(str, alphabet).call
end

.encode(str, alphabet = Base32::Alphabet::CHARS) ⇒ Object



17
18
19
# File 'lib/base32.rb', line 17

def self.encode(str, alphabet = Base32::Alphabet::CHARS)
  Encoder.new(str, alphabet).call
end