Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A node module for baseXX encoding and decoding e.g. base58, base16, base32, base64
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
Gruntfile.js
LICENCE
README.md
package.json

README.md

encdec

encdec is a node module that helps you baseXX encode and decode.

It defaults to using base58 encoding, but can easily be adapted for base16, base32, base64 - or any other base - by passing the alphabet you want to use to the create() method.

Installation

encdec can be installed from npm via:

npm install encdec

or you can clone a copy from GitHub:

git clone git://github.com/ianoxley/node-encdec.git
cd node-encdec && npm install

Usage

  var base58 = require('encdec').create() // defaults to base58
base58.encode(1000);
base58.decode('if');

// base32 encoding
var base32 = require('encdec').create('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567');
base32.encode(1000000);
base32.decode('6QSA');
Something went wrong with that request. Please try again.