nn::nex::String::ByteArrayToBase64 Member Function

Syntax

static int ByteArrayToBase64(
     const qByte * pbSrc,
     qUnsignedInt uiSrcLength,
     qChar * szADest,
     qUnsignedInt32 uiDestLength
);

Parameters

Name Description
in pbSrc Pointer to the input data.
in uiSrcLength Size of the input data.
out szADest Pointer to the destination buffer for the base64 string. If conversion succeeds, a null terminator is added to the end of the string.
in uiDestLength The size of the buffer indicated by szADest, including a null terminator.

Return Values

Returns whether conversion succeeded. If successful, the function returns the length of the post-conversion string.

Value Description
-1 Conversion failed. (The output buffer is not big enough.)
Other The post-conversion string length.

Description

Converts the entered binary data into a base64 format type qChar string.

If NULL is specified for szADest, the function returns the required size of szADest for conversion without actually converting. The required size includes the space needed for the null terminator.

Revision History

2012/07/16
Revised sloppy notations.
2012/06/08
Initial version.

CONFIDENTIAL