Expand description
Bech32 (BIP-173) checksummed Base32 data encoding (WARNING: preview!)
NOTE: This implementation is not yet constant time, but we intend to make it such. It is provided as a preview of an upcoming feature, and is not enabled by default.
To enable it, add the following cargo feature: bech32-preview
Structs§
- Bech32
- Bech32 encoder/decoder
Constants§
- DEFAULT_
CHARSET - Bech32 default alphabet (lower case)
- DEFAULT_
CHARSET_ UPCASE - Bech32 default alphabet (upper case)
- DEFAULT_
SEPARATOR - Default separator character
Functions§
- decode
- Decode the given data from lower-case Bech32, returning a 2-tuple of the
“human readable part” of the message as a
String
and aVec<u8>
of data, or anError
if decoding failed. - decode_
upper - Decode the given data from upper-case Bech32, returning a 2-tuple of the
“human readable part” of the message as a
String
and aVec<u8>
of data, or anError
if decoding failed. - encode
- Encode the given data as lower-case Bech32, returning a
String
- encode_
upper - Encode the given data as upper-case Bech32, returning a
Vec<u8>