Module domain::utils::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

Modules

  • Serialize and deserialize octets Base 16 encoded or binary.

Structs

Functions

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