base-32
v0.0.3
Published
Library to encode/decode strings or binary data in base32.
Maintainers
Readme
Base-32 
Library to encode/decode strings or binary data in base32. Note: This library uses the RFC 4648 Base32 alphabet.
Install
npm install base-32
Usage
Setup
const base32 = require('base-32').default;Encoding Strings
const str = 'Encode this string';
base32.encode(str);Output
IVXGG33EMUQHI2DJOMQHG5DSNFXGO===Encoding Binary Data
const buf = new Buffer('this is a tést');
base32.encode(buf);Output
ORUGS4ZANFZSAYJAOTB2S43UDecoding
const encodedString = 'ORSXG5DJNZTQ====';
base32.decode(encodedString);Output
testingMethods
encode ⇒ String
Encodes a string or binary data in base32.
| Param | Type | | --- | --- | | input | String | Buffer |
decode ⇒ String
Decodes data encoded in base32.
| Param | Type | | --- | --- | | input | String | Buffer |
