Skip to Content
oxcrypto

Encodings

Encode bytes as text and decode text with constant-time crates.

Choose an alphabet and call encode or decode. Both take and return bytes. The upstream base16ct, base32ct and base64ct crates are written to run in constant time with respect to the encoded data, for use with keys and other secrets. oxcrypto has not verified this independently. Invalid input raises ValueError.

Encodings

  • Base16 Encode bytes as lower or upper hex.
  • Base32 Encode bytes with the RFC 4648 Base32 alphabet.
  • Base64 Encode bytes with standard, URL-safe or password-hash Base64 alphabets.
  • PEM Encode bytes as an RFC 7468 document with a type label.

On this page