0.2.0 • Published 6 years ago

base58encoder v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

base58encoder

Build Status

Base 58 encoding and decoding with String using Flickr Alphabet (see Wikipedia article)

installation

$ npm install base58encoder

Usage

const encoder = require('base58encoder');

// encode
console.log(encoder.encode('1000456987'));
// 3LhmXSzSZVxzU4

// decode
console.log(encoder.decode('3LhmXSzSZVxzU4'));
// 1000456987

// encode
console.log(encoder.encode('var=умартах'));
// 5UMuUcfmjqiNQeBakyNGpzAqV

// decode
console.log(encoder.decode('5UMuUcfmjqiNQeBakyNGpzAqV'));
// var=умартах

Resources

uses base-x initialized with ALPHABET = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ';

Licensing

Licensed under the MIT License

A copy of the license is available in the repository's LICENSE file.