npm: @voken/base32¶
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 a-z
,
excluding a few letters that might look like numbers,
which we simply interpret as follows:
i
,l
->1
o
->0
z
->2
const ALPHABET = '0123456789abcdefghjkmnpqrstuvwxy'
Each character corresponds to 5 bits of input.
Lexicographic order of strings is preserved through Base 32 encoding.
API¶
Credits¶
Mike Hearn for original Java implementation
Stefan Thomas for porting to JavaScript
Stephan Pair for buffer improvements
Daniel Cousens for cleanup and merging improvements from bitcoinjs-lib
Jared Deckard for killing
bigi
as a dependency
License¶
MIT