Toolkit (Demo): https://voken1000g.github.io/toolkit/base32/
Compute Voken flavored Base32 encoding/decoding, with auto checksum.
@voken/base32 is human-friendly – you don’t have to worry about letters/numbers that are easy to confuse, making it easier to transmit in handwriting or typing over the phone.
The encoding alphabet consists of the numerals
0-9 and the letters
excluding a few letters that might look like numbers,
which we simply interpret as follows:
const ALPHABET = '0123456789abcdefghjkmnpqrstuvwxy'
Each character corresponds to 5 bits of input.
Lexicographic order of strings is preserved through Base 32 encoding.
npm i --save @voken/base32
yarn add @voken/base32
input must be a Buffer or an
Array. Returns a
const base32 = require('@voken/base32') const bytes = Buffer.from('This is a example.') const decoded = base32.encode(bytes) console.log(decoded) // => AhM6jvS0d5Sj0R90CNV62UbGDHjJV
Hack / Test¶