Jump to: base64 Base64Exception Base64CharException encodeLength encode decodeLength decode
Encodes/decodes MIME base64 data.
将编码/解码 MIME base64 数据。
References:引用:
Wikipedia Base64
RFC 2045
class Base64Exception: object.Exception;
class Base64CharException: std.base64.Base64Exception;
uint encodeLength(uint slen);
Returns the number of bytes needed to encode a string of length slen.
返回编码的长度 slen 字符串所需的字节的数。
char[] encode(string str, char[] buf);
Encodes str[] and places the result in buf[].
将编码 str [] 并将结果放在 buf [] 中。
参数:
string str string to encode 字符串为 编码
char[] buf destination buffer, must be large enough for the result.
目标的缓冲区必须有足够的结果。
Returns:
slice into buf[] representing encoded result 到 buf [] 表示编码的结果片
string encode(string str);
Encodes str[] and returns the result.
将编码 str [] 并返回结果。
uint decodeLength(uint elen);
Returns the number of bytes needed to decode an encoded string of this length.
返回所需的这一编码的字符串解码的字节的数 长度。
char[] decode(string estr, char[] buf);
Decodes str[] and places the result in buf[].
解码 str [] 并将结果放在 buf [] 中。
Parameters:参数:
str string to encode要编码的字符串
char[] buf destination buffer, must be large enough for the result.
目标的缓冲区必须有足够的结果。
Returns:
slice into buf[] representing encoded result
到 buf [] 表示编码的结果片
Errors:
Throws Base64Exception on invalid base64 encoding in estr[]. Throws Base64CharException on invalid base64 character in estr[].
引发 Base64Exception 无效 base64 编码的 estr []。 引发 Base64CharException estr [] 无效 base64 特征。
string decode(string estr);
Decodes estr[] and returns the result.解码 estr[] 并返回结果。
Errors:
Throws Base64Exception on invalid base64 encoding in estr[]. Throws Base64CharException on invalid base64 character in estr[].
引发 Base64Exception 无效 base64 编码的 estr[]。 引发 Base64CharException estr [] 无效 base64 特征。
Encodes/decodes MIME base64 data.
将编码/解码 MIME base64 数据。
References:引用:
Wikipedia Base64
RFC 2045
class Base64Exception: object.Exception;
class Base64CharException: std.base64.Base64Exception;
uint encodeLength(uint slen);
Returns the number of bytes needed to encode a string of length slen.
返回编码的长度 slen 字符串所需的字节的数。
char[] encode(string str, char[] buf);
Encodes str[] and places the result in buf[].
将编码 str [] 并将结果放在 buf [] 中。
参数:
string str string to encode 字符串为 编码
char[] buf destination buffer, must be large enough for the result.
目标的缓冲区必须有足够的结果。
Returns:
slice into buf[] representing encoded result 到 buf [] 表示编码的结果片
string encode(string str);
Encodes str[] and returns the result.
将编码 str [] 并返回结果。
uint decodeLength(uint elen);
Returns the number of bytes needed to decode an encoded string of this length.
返回所需的这一编码的字符串解码的字节的数 长度。
char[] decode(string estr, char[] buf);
Decodes str[] and places the result in buf[].
解码 str [] 并将结果放在 buf [] 中。
Parameters:参数:
str string to encode要编码的字符串
char[] buf destination buffer, must be large enough for the result.
目标的缓冲区必须有足够的结果。
Returns:
slice into buf[] representing encoded result
到 buf [] 表示编码的结果片
Errors:
Throws Base64Exception on invalid base64 encoding in estr[]. Throws Base64CharException on invalid base64 character in estr[].
引发 Base64Exception 无效 base64 编码的 estr []。 引发 Base64CharException estr [] 无效 base64 特征。
string decode(string estr);
Decodes estr[] and returns the result.解码 estr[] 并返回结果。
Errors:
Throws Base64Exception on invalid base64 encoding in estr[]. Throws Base64CharException on invalid base64 character in estr[].
引发 Base64Exception 无效 base64 编码的 estr[]。 引发 Base64CharException estr [] 无效 base64 特征。