Module base64

Source
Expand description

base64

Structs§

Config
Contains configuration parameters for base64 encoding

Enums§

CharacterSet
Available encoding character sets
DecodeError
DecodeError

Constants§

STANDARD
Standard character set with padding.

Functions§

add_padding
Write padding characters. output is the slice where padding should be written, of length at least 2.
decode
decode
decode_config
decode_config
decode_config_buf
decode_config_buf
encode
Encode arbitrary octets as base64. Returns a String. Convenience for encode_config(input, base64::STANDARD);.
encode_config
Encode arbitrary octets as base64. Returns a String.
encode_config_buf
Encode arbitrary octets as base64. Writes into the supplied output buffer, which will grow the buffer if needed.
encode_config_slice
Encode arbitrary octets as base64. Writes into the supplied output buffer.
encode_to_slice
Encode input bytes to utf8 base64 bytes. Does not pad. output must be long enough to hold the encoded input without padding. Returns the number of bytes written.
encoded_size
calculate the base64 encoded string size, including padding if appropriate