Skip to content

zero dependency base32 encoder/decoder based on rfc3548

License

Notifications You must be signed in to change notification settings

distrentic/base32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

base32

npm version

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)