RFC 3548 base64 encoding and decoding utilities. This API is compatible with the Gauche library rfc.base64.
Return a base64 decoded representation of string, also interpreting the alternate 62 & 63 valued characters as described in RFC3548. Other out-of-band characters are silently stripped, and = signals the end of the encoded string. No errors will be raised. Variation of the above to read and write to ports.Return a base64 encoded representation of string according to the official base64 standard as described in RFC3548. Variation of the above to read and write to ports.Return a base64 encoded representation of the stringstr
as
above, wrapped in =?ENC?B?...?= as per RFC1522, split across
multiple MIME-header lines as needed to keep each lines length
less than max-col
. The string is encoded as is, and the
encoding enc
is just used for the prefix, i.e. you are
responsible for ensuring str
is already encoded according to
enc
. The optional argument nl
is the newline
separator, defaulting to crlf
.