iroh_base::base32

Function parse_array_hex_or_base32

Source
pub fn parse_array_hex_or_base32<const LEN: usize>(
    input: &str,
) -> Result<[u8; LEN], HexOrBase32ParseError>
Available on crate feature base32 only.
Expand description

Parse a fixed length hex or base32 string into a byte array

For fixed length we can know the encoding by the length of the string.