Package base64 implements base64 encoding as specified by RFC 4648.

Static methods

staticinlinenewDecoder(_enc:Ref<Encoding>, _r:Reader):Reader

NewDecoder constructs a new base64 stream decoder.

See also:

staticinlinenewEncoder(_enc:Ref<Encoding>, _w:Writer):WriteCloser

NewEncoder returns a new base64 stream encoder. Data written to the returned writer will be encoded using enc and then written to w. Base64 encodings operate in 4-byte blocks; when finished writing, the caller must Close the returned encoder to flush any partially written blocks.

See also:

staticinlinenewEncoding(_encoder:GoString):Ref<Encoding>

NewEncoding returns a new padded Encoding defined by the given alphabet, which must be a 64-byte string that does not contain the padding character or CR / LF ('\r', '\n'). The alphabet is treated as sequence of byte values without any special treatment for multi-byte UTF-8. The resulting Encoding uses the default padding character ('='), which may be changed or disabled via WithPadding.

See also: