std.base64
Encodes/decodes MIME base64 data. References:Wikipedia Base64
RFC 2045
- Returns the number of bytes needed to encode a string of length slen.
- Encodes str[] and places the result in buf[].
Parameters:
Returns:string str string to encode char[] buf destination buffer, must be large enough for the result.
slice into buf[] representing encoded result - Encodes str[] and returns the result.
- Returns the number of bytes needed to decode an encoded string of this length.
- Decodes str[] and places the result in buf[].
Parameters:
Returns:str string to encode char[] buf destination buffer, must be large enough for the result.
slice into buf[] representing encoded result Errors:
Throws Base64Exception on invalid base64 encoding in estr[]. Throws Base64CharException on invalid base64 character in estr[]. - Decodes estr[] and returns the result.
Errors:
Throws Base64Exception on invalid base64 encoding in estr[]. Throws Base64CharException on invalid base64 character in estr[].