MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLStreamingFunctions Class Reference

Detailed Description

This class offers various streaming helper functions.

Static Public Member Functions

static bool base64Decode (const char *base64Data, unsigned char *&outputData, unsigned int &outputDataLength, char index62Character='+', char index63Character='/')
 
static bool base64Encode (const unsigned char *binary, unsigned int binaryLength, char *&outputData, char index62Character='+', char index63Character='/', int lineLength=-1)
 
static void freeBuffer (void *buffer)
 

Member Function Documentation

◆ base64Decode()

static bool TSLStreamingFunctions::base64Decode ( const char * base64Data,
unsigned char *& outputData,
unsigned int & outputDataLength,
char index62Character = '+',
char index63Character = '/' )
static

Decodes base64 encoded data.

The index62Character and index63Character parameters are used to specify the character to expect for the base64 indices 62 and 63. Different base64 variants use different characters for these indices.

Parameters
base64DataThe base64 encoded data string
outputDataThis will be populated with a data buffer containing the decoded binary data. It should be freed using the freeBuffer method.
outputDataLengthThis will be populated with the length of the data buffer pointed to by the outputData parameter.
index62CharacterThe character to expect for the 62nd base64 index
index63CharacterThe character to expect for the 63rd base64 index
Returns
true on success, false otherwise.

◆ base64Encode()

static bool TSLStreamingFunctions::base64Encode ( const unsigned char * binary,
unsigned int binaryLength,
char *& outputData,
char index62Character = '+',
char index63Character = '/',
int lineLength = -1 )
static

Encodes binary data into base64, padded to 4-byte boundaries using the '=' character.

The index62Character and index63Character parameters are used to specify the character to encode the base64 indices 62 and 63. Different base64 variants use different characters for these indices.

Certain base64 variants also require line breaks every nth character. The lineLength parameter is used to specify the length of each base64 line in characters. The value -1 specifies not to add line breaks.

Parameters
binaryThe buffer containing the binary data to be encoded.
binaryLengthThe length of the buffer passed in the binary parameter.
outputDataThis will be populated with the base64 encoded string. It should be freed using the freeBuffer method.
index62CharacterThe character to encode the 62nd base64 index
index63CharacterThe character to encode the 63rd base64 index
lineLengthThe length of each base64 line or -1 to specify that line breaks are not required.
Returns
true on success, false otherwise.

◆ freeBuffer()

static void TSLStreamingFunctions::freeBuffer ( void * buffer)
static

This method should be called to free any buffers returned by this class.