Home

Awesome

Base32 Encode

Base32 encoder with support for multiple variants.

Installation

npm install --save base32-encode

Usage

import base32Encode from 'base32-encode'
const data = new Uint8Array([0x74, 0x65, 0x73, 0x74])

console.log(base32Encode(data, 'Crockford'))
//=> EHJQ6X0

console.log(base32Encode(data, 'RFC4648'))
//=> ORSXG5A=

console.log(base32Encode(data, 'RFC4648', { padding: false }))
//=> ORSXG5A

console.log(base32Encode(data, 'RFC4648-HEX'))
//=> EHIN6T0=

API

base32Encode(data, variant[, options])

Encode the data in data into a Base32 encoded string.

Variants

See also