Base64 encoder/decoder for Guiliani. More...
#include <GUIBase64.h>
Static Public Member Functions | |
static eC_Int | Decode (eC_UByte *pubBuf, const eC_UInt uiBufLen, const eC_Char *pcIn) |
static eC_Char * | Encode (eC_Char *pcBuf, const eC_UInt uiBufLen, const eC_UByte *pubIn, const eC_UInt uiSrcLen) |
Base64 encoder/decoder for Guiliani.
All binary input is supported, not just ASCII.
|
static |
Decodes a base64 data stream to a stream of characters.
The output buffer's (pubBuf) size should be at least strlen(pcIn) * 3 / 4 bytes. Check return value afterwards to get the exact number of decoded bytes.
pubBuf | [out] Output buffer containing decoded data. |
uiBufLen | The size of the output buffer in bytes. |
pcIn | Input base64 data stream. |
|
static |
Encodes a stream of values to a base64 data stream.
To encode a value stream (pubIn) to a base64 stream, it is necessary to allocate the output buffer before.
The output buffer's (uiBufLen) size should be at least uiSrcLen * 4 / 3 + 4Byte-Padding bytes. You can use the GETBASE64BUFFERSIZE helper macro to get a sufficient size.
pcBuf | [out] Pointer to the preallocated output buffer. After this method finished, this buffer contains the zero terminated base64 string. |
uiBufLen | The size of the output buffer in bytes. |
pubIn | Input buffer to encode. |
uiSrcLen | Number of characters of the input buffer to be encoded. |