I_IrmCrypt.HrEncode Method

Last modified: October 05, 2009

Applies to: SharePoint Foundation 2010

Encodes data into the specified binary format for inclusion in the protected document, even if that data is not encrypted.


HRESULT HrEncode(
    WCHAR *wszAlgID,
    UINT   uDataLen,
    BYTE  *pbDecodedData,
    UINT  *puEncodedStringLen,
    WCHAR *wszEncodedString
) PURE;

wszAlgID

[in] The type of encoding to perform on the data.

This argument is passed directly to the Rights Management Services (RMS) server API. In most cases, this is set to "base64."

uDataLen

[in] The length, in bytes, of the data to be encoded.

pbDecodedData

[in] The data to be encoded.

puEncodedStringLen

[in/out] The length, in bytes, of the encoded data.

wszEncodedString

[out] The encoded data.

Use this method to encode data into the correct format for inclusion in the protected file, even if that data is not encrypted. For example, because the Information Rights Management (IRM) protector must include the document issuance license (IL) and the server end-user license (EUL) in the protected file, these items must be encoded based on the binary format of the file type. Use this method to include any unencrypted data in the protected file.

Unlike the I_IrmCrypt.HrEncrypt Method and I_IrmCrypt.HrDecrypt Method methods, encoding is not performed in place.

Show: