[−][src]Module domain::utils::base64
Decoding and encoding of base 64.
The base 64 encoding is defined in RFC 4648. There are two variants defined in the RFC, dubbed base64 and base64url which are differenciated by the last two characters in the alphabet. The DNS uses only the original base64 variant, so this is what is implemented by the module for now.
The module defines the type Decoder
which keeps the state necessary
for decoding. The convenince functions decode
and display
decode and encode octets, respectively.
Decoding currently requires the bytes
feature as it is intended for
use by the master file parser. This will change when the parser will be
converted to work with any octets builder.
Enums
DecodeError | An error happened while decoding a base 64 or base 32 encoded string. |
Functions
display | Encodes binary data in base64 and writes it into a format stream. |
encode_string | Encodes binary data in base64 and returns the encoded data as a string. |