IWMDRMLicense::CreateSecureDecryptor method
[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The CreateSecureDecryptor method creates a secure decryptor object. The secure decryptor differs from the normal decryptor in that it decrypts the content and then re-encrypts it according to the settings specified in the parameters of this method.
Syntax
HRESULT CreateSecureDecryptor(
[in] BYTE *pbCertificate,
[in] DWORD cbCertificate,
[in] DWORD dwCertificateType,
[in] DWORD dwFlags,
[out] BYTE *pbInitializationVector,
[in, out] DWORD *pcbInitializationVector,
[out] IWMDRMDecrypt **ppDecryptor
);
Parameters
-
pbCertificate [in]
-
Certificate of the calling application.
-
cbCertificate [in]
-
Size of the certificate in bytes.
-
dwCertificateType [in]
-
The type of the certificate. Set to WMDRM_CERTIFICATE_TYPE_XML.
-
dwFlags [in]
-
The type of session protection to use for re-encoding. Must be set to one of the constants in the following table:
Constant Description WMDRM_PROTECTION_TYPE_RC4 Uses RC4 encryption for session encryption. This is the only supported session protection for this version. -
pbInitializationVector [out]
-
Receives the initialization vector. The initialization vector is RSA encrypted using the OAEP padding scheme with the RSA public key found in the certificate. Set to NULL to receive the required buffer size in pcbInitializationVector.
-
pcbInitializationVector [in, out]
-
On input, the size of the buffer passed as pbInitializationVector. On output, the size of the used portion of the buffer. If you pass NULL for pbInitializationVector, this value is set to the required buffer size on output.
-
ppDecryptor [out]
-
Receives a pointer to the IWMDRMDecrypt interface of the newly created object.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The method succeeded. |
Remarks
None.
Requirements
Requirement | Value |
---|---|
Header |
|