Encodings
Base32hex
RFC 4648 base32 with the extended hex alphabet. Sorts in the same order as the bytes
Encoding / Base32
Base32hex
Base32 that sorts in byte order.
- Overhead
- +60% on random bytes
- Padding
- = to a whole block
- Standard
- RFC 4648 §7
- Used by
- DNSSEC NSEC3
family 4 / 20
Sample
- Out
- D1IMOR3F41RMUSJCCGGG====
- Back
- "hello world!"
0123456789ABCDEFGHIJKLMNOPQRSTUV
Access
- Import
import { base32hex } from "@agntn/encodings/base32" - CLI
encodings encode base32hex 'hello world!' - Tryplayground with the sample above
- Kinbase32, base32-crockford, z-base-32
Base32 with 0 to 9 and A to V. Why bother? Order. Sort the encoded strings and they line up exactly like the bytes. Plain base32 can't do that.
encode("base32hex", "foobar"); // "CPNMUOJ1E8======"
DNSSEC uses it for NSEC3 hashed owner names, unpadded. This codec writes the padded uppercase form from RFC 4648. It reads both.