Skip to Content
oxcrypto

Base16

Encode bytes as lower or upper hex.

from oxcrypto.encoding.base16 import BASE16

encoded = BASE16.LOWER.encode(b"\xab\xcd")  # b"abcd"
BASE16.MIXED.decode(b"aBcD")  # b"\xab\xcd"

LOWER and UPPER accept only their own case when decoding. MIXED decodes either case and cannot encode.

StandardRFC 4648 section 8 (Proposed Standard)
Cratebase16ct 1.0.0 (RustCrypto formats), stable
AuditNo published audit
MSRV1.85, builds with the project MSRV 1.88
ExperimentalNo
Test vectorsRFC 4648 section 10, base16ct tests