12 Base 64: Encoding and Decoding
The
net/base64 library provides
utilities for Base 64 (mime-standard) encoding and decoding.
12.1 Functions
Consumes a byte string and returns its Base 64 encoding as a new byte
string. The returned string is broken into 72-byte lines separated by
CRLF combinations, and always ends with a CRLF combination unless the
input is empty.
Consumes a byte string and returns its Base 64 decoding as a new byte
string.
Reads bytes from in and writes the encoded result to
out, breaking the output into 72-character lines separated by
newline-bstr, and ending with newline-bstr unless
the input stream is empty. Note that the default newline-bstr
is just #"\n", not #"\r\n". The procedure returns when
it encounters an end-of-file from in.
Reads a Base 64 encoding from in and writes the decoded
result to out. The procedure returns when it encounters an
end-of-file or Base 64 terminator = from in.
12.2 Base64 Unit
12.3 Base64 Signature
Includes everything exported by the net/base64 module.