yabase/base32/hex

Values

pub fn decode(
  input: String,
) -> Result(BitArray, error.CodecError)

Decode a Base32 Hex string to a BitArray.

Non-alphabet characters (whitespace, CR/LF, punctuation outside 0-9, A-V, and =) are rejected with InvalidCharacter carrying the offending byte and its position. The alphabet check runs before the length check so the caller does not see a misleading InvalidLength when the real fault is an out-of-alphabet byte.

pub fn encode(data: BitArray) -> String

Encode a BitArray to Base32 Hex string with padding.

Sub-byte input panics; see yabase/core/guard.assert_byte_aligned.

Search Document