base32_decode
Decodes s from base32 (RFC 4648 section 6).
Import
Section titled “Import”Cargo feature hex (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
s | &str | The base32 string to decode, with = padding to a multiple of 8 characters. |
Returns
Section titled “Returns”Result<Vec<u8>, Base32DecodeError> — Ok on success, otherwise an Err: see Errors.
Errors
Section titled “Errors”Returns a Base32DecodeError when the length is not a multiple of 8, = appears anywhere
but the end, or a character is not in the base32 alphabet.
Examples
Section titled “Examples”Error type: Base32DecodeError
Section titled “Error type: Base32DecodeError”Why a string could not be decoded as base32.
