Expand description
§BaseNC
Pronounced “Base-En-See”.
Encoding and decoding hex, base64 and base32 with support for #[no_std].
§Examples
Encoding:
let encoded = basenc::Base64Std.encode(b"hello world");
assert_eq!(encoded, "aGVsbG8gd29ybGQ");Decoding:
let decoded = basenc::Base64Std.decode("aGVsbG8gd29ybGQ=").unwrap();
assert_eq!(decoded, b"hello world");§Encoding
The hero of the show is Encoding, defining the entry point for encoding and decoding for an encoding.
§Buffers
Buffers are types implementing the EncodeBuf and DecodeBuf traits.
Existing buffers can be reused with the encode_into and decode_into methods.
Re-exports§
pub use Padding::None as NoPad;
Modules§
- incremental
- Incremental processing
Structs§
- Base32
- Base32 alphabet.
- Base64
- Base64 alphabet.
- Display
- Display wrapper for encoding.
- Lower
Hex - Hex charset using lower-case letters.
- Ratio
- Ratio between encoded and decoded lengths.
- Upper
Hex - Hex charset using upper-case letters.
- WithPad
- Encoding with explicit padding policy.
Enums§
Statics§
- Base32
Hex - Base32 Extended Hex alphabet.
- Base32
Std - Base32 RFC 4648 alphabet.
- Base32Z
- z-base-32 alphabet.
- Base64
Std - Base64 standard charset.
- Base64
Url - Base64 url-safe charset.