# Base64Codec.h

This HTML document was auto-generated from Base64Codec.h

### Method: Base64Codec_encode

    //=============================================================================
    // Method:	Base64Codec_encode
    // Desc:	Encode an array of bytes as a null-terminated string of UTF-16
    //			characters using base64 encoding.
    //
    // Notes:
    //			The returned string must be freed via a call to base64EncodeFree()
    //=============================================================================
    	DIRXML_EXPORT
    	unicode * IFAPI                                 //pointer to UTF-16 string
    	Base64Codec_encode(
    	    unsigned char * data,                       //array of bytes to be encoded
    	    int off,                                    //starting offset in array
    	    int len);                                   //number of bytes to encode

### Method: Base64Codec_encodeFree

    //=============================================================================
    // Method:	Base64Codec_encodeFree
    // Desc:	Free a string returned from base64Encode()
    //
    // Notes:
    //=============================================================================
    	DIRXML_EXPORT
    	void IFAPI
    	Base64Codec_encodeFree(
    	    unicode * encodedData);                     //pointer to UTF-16 string returned from base64Encode

### Method: Base64Codec_decode

    //=============================================================================
    // Method:	Base64Codec_decode
    // Desc:	Decode binary data from a UTF-16 string containing the data encoded
    //			in base64.
    //
    // Notes:
    //			The returned array must be freed via a call to base64DecodeFree()
    //			If the input data is malformed, 0 is returned
    //=============================================================================
    	DIRXML_EXPORT
    	unsigned char * IFAPI                           //pointer to array of bytes containing decoded data (0 if malformed encodedData)
    	Base64Codec_decode(
    	    const unicode * encodedData,                //pointer to UTF-16 string containing base64-encoded data
    	    int * decodedLength);                       //pointer to int to receive length of decoded data

### Method: Base64Codec_decodeFree

    //=============================================================================
    // Method:	Base64Codec_decodeFree
    // Desc:	Free a string returned from base64Decode()
    //
    // Notes:
    //=============================================================================
    	DIRXML_EXPORT
    	void IFAPI
    	Base64Codec_decodeFree(
    	    unsigned char * decodedData);               //pointer to array returned from base64Decode