#include <dwc.h>
int DWC_Base64Encode(const char *src, const u32 srclen, char *dst, const u32 dstlen);
This function encodes the data designated with src in Base64 and outputs it as a char-type character string.
If NULL is designated in dst, no conversion will occur and the maximum character string length expected after the conversion is returned as the return value. The maximum character string length is a value for the worst-case conversion efficiency, so the actual length is often smaller after conversion.
The post-conversion character string does not include a NULL terminator.
This function uses a special type of Base64.
You must use the DWC_Base64Decode function to decode data encoded with this function.
src |
Pointer to the data to convert. |
srclen |
The data size of the data to convert. |
dst |
Pointer to the buffer used to store the post-conversion data. |
dstlen |
The size (the length of the character string) of the buffer used to store the post-conversion data. |
-1 |
Conversion failed. The maximum length of the character string expected after the conversion exceeds the value of the dstlen argument. |
Zero or greater |
The actual size (the character string length) of the post-conversion data. |
2006/07/24 Added a caution note
2006/02/27 Changed description when changes were made to function arguments
2006/01/18 Initial version
CONFIDENTIAL