Module base16

Source
Expand description

Decoding and encoding of Base 16 a.k.a. hex digits.

The Base 16 encoding is defined in RFC 4648. It really is just a normal hex-encoding using the (case-insensitive) letters ‘A’ to ‘F’ as additional values for the digits.

The module defines the type Decoder which keeps the state necessary for decoding. The various functions offered use such a decoder to decode and encode octets in various forms.

Re-exports§

pub use super::base64::DecodeError;

Structs§

Decoder
A Base 16 decoder.
SymbolConverter
A Base 16 decoder that can be used as a converter for a scanner.

Functions§

decode
Decodes a string with Base 16 encoded data.
decode_vec
Decodes a string with Base 16 data and returns it as a vec.
display
Encodes binary data in Base 16 and writes it into a format stream.
encode_display
Returns a placeholder value that implements Display for encoded data.
encode_string
Encodes binary data in Base 16 and returns the encoded data as a string.