nn::nex::String::Base64ToByteArray Member Function

Syntax

static int Base64ToByteArray(
     const qChar * szASrc,
     qUnsignedInt32 uiSrcLength,
     qByte * pbDest,
     qUnsignedInt32 uiDestLength
);

Parameters

Name Description
in szASrc Pointer to the input base64 string.
in uiSrcLength Length of the input base64 string. Must be a multiple of 4. The null terminator is not included.
out pbDest Pointer to the buffer for storing the output data.
in uiDestLength Size of the buffer specified by pbDest.

Return Values

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

Value Description
-1 Conversion failed. (The output buffer is not big enough.)
Other Buffer size after conversion.

Description

Converts a base-64 format into binary data.

If NULL is specified for pbDest, the function returns the (theoretical) required size of pbDest for conversion and does not actually convert the data.

Revision History

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

CONFIDENTIAL