Skip to main content

decode

Function decode 

Source
pub const fn decode(bytes: &[u8]) -> [u8; 48]
Expand description

Decodes a Crockford Base32 representation.

Decoding is lenient: it is case-insensitive, it maps the ambiguous glyphs I, L, O, and U onto their intended values, and it zero-fills when bytes is shorter than a whole hash. Any other out-of-alphabet byte is skipped, which shifts every subsequent digit. Truncation is left for the Reed-Solomon codec to correct.