Skip to Content
oxcrypto

Base32

Encode bytes with the RFC 4648 Base32 alphabet.

from oxcrypto.encoding.base32 import BASE32

BASE32.UPPER.encode(b"foobar")  # b"MZXW6YTBOI======"
BASE32.LOWER_UNPADDED.decode(b"mzxw6ytboi")  # b"foobar"

UPPER and LOWER use = padding; the _UNPADDED variants reject it. Each variant decodes only its own case.

StandardRFC 4648 section 6 (Proposed Standard)
Cratebase32ct 0.3.1 (RustCrypto formats), pre-1.0 release
AuditNo published audit
MSRV1.85, builds with the project MSRV 1.88
ExperimentalNo
Test vectorsRFC 4648 section 10, base32ct tests