An implementation of Douglas Crockfords Base32-Encoding in Ruby
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/base32
test
.gitignore use Bundler, bump version to 0.0.3, fixes #2 Jun 25, 2011
.travis.yml
Gemfile
README.markdown
Rakefile use Bundler, bump version to 0.0.3, fixes #2 Jun 25, 2011
base32-crockford.gemspec Use github repo as homepage. May 14, 2015

README.markdown

An implementation of Douglas Crockfords Base32-Encoding in Ruby

see http://www.crockford.com/wrmg/base32.html

Installation

$ gem install base32-crockford

Changes

0.1.0 - rename gem to base32-crockford
0.0.2 - ruby 1.9 compatibility
0.0.1 - initial release

Usage

#!/usr/bin/env ruby

require 'base32/crockford'

Base32::Crockford.encode(1234)                            # => "16J"
Base32::Crockford.encode(100**10, :split=>5, :length=>15) # => "02PQH-TY5NH-H0000"
Base32::Crockford.decode("2pqh-ty5nh-hoooo")              # => 10**100