Skip to main content

Crate qr_base45

Crate qr_base45 

Source
Expand description

qr-base45: Base45 encoder/decoder for arbitrary bytes (RFC 9285) using the QR alphanumeric alphabet.

  • Encoding groups: 2 bytes -> 3 chars; 1 byte -> 2 chars.
  • Alphabet: “0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:”
  • Public API encodes &u8 -> String and decodes &str -> Vec.

Enums§

Base45Error

Constants§

BASE45_ALPHABET
Base45 alphabet as per RFC 9285

Functions§

decode
Decode a Base45 string back to raw bytes. Accepts only the RFC 9285 alphabet; returns errors for invalid chars, dangling final char, or overflow.
encode
Encode arbitrary bytes into a Base45 string. Groups of 2 bytes produce 3 characters; a final single byte produces 2 characters.