ID3D11VideoContext::GetEncryptionBltKey method (d3d11.h)

Gets the cryptographic key to decrypt the data returned by the ID3D11VideoContext::EncryptionBlt method.

Syntax

HRESULT GetEncryptionBltKey(
  [in]  ID3D11CryptoSession *pCryptoSession,
  [in]  UINT                KeySize,
  [out] void                *pReadbackKey
);

Parameters

[in] pCryptoSession

A pointer to the ID3D11CryptoSession interface.

[in] KeySize

The size of the pReadbackKey array, in bytes. The size should match the size of the session key.

[out] pReadbackKey

A pointer to a byte array that receives the key. The key is encrypted using the session key.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method applies only when the driver requires a separate content key for the EncryptionBlt method. For more information, see the Remarks for EncryptionBlt.

Each time this method is called, the driver generates a new key.

The KeySize should match the size of the session key.

The read back key is encrypted by the driver/hardware using the session key.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header d3d11.h

See also

ID3D11VideoContext