@distrentic/base32
v1.0.1
Published
zero dependency base32 encoder/decoder based on rfc3548
Downloads
9
Readme
base32
zero dependency base32 encoder/decoder based on rfc3548
Installation
npm install @distrentic/base32
yarn add @distrentic/base32
Usage
import base32 from "@distrenctic/base32";
const encoded = base32.toBase32("test");
console.log(encoded);
// => ORSXG5AA
console.log(base32.fromBase32(encoded).toString());
// => test
API
Methods
toBase32(< string | Uint8Array > input) - (string) - Encodes the data in
input
.fromBase32(< string > input) - (string) - Decodes the base32 encoded data in
input
.
License
Licensed under MIT license (LICENSE or http://opensource.org/licenses/MIT)