Reads encrypted data from a protected surface.
public:
void EncryptionBlt(
ID3D11CryptoSession *pCryptoSession,
ID3D11Texture2D *pSrcSurface,
ID3D11Texture2D *pDstSurface,
UINT IVSize,
void *pIV
)
pCryptoSession
Type: ID3D11CryptoSession *
[in] A pointer to the ID3D11CryptoSession interface of the cryptographic session.
pSrcSurface
Type: ID3D11Texture2D *
[in] A pointer to the ID3D11Texture2D interface of the protected surface.
pDstSurface
Type: ID3D11Texture2D *
[in] A pointer to the ID3D11Texture2D interface of the surface that receives the encrypted data.
IVSize
Type: UINT
[in] The size of the pIV buffer, in bytes.
*pIV
Type: void
[in, out, optional] A pointer to a buffer that receives the initialization vector (IV). The caller allocates this buffer, but the driver generates the IV. For 128-bit AES-CTR encryption, pIV points to a D3D11_AES_CTR_IV structure. When the driver generates the first IV, it initializes the structure to a random number. For each subsequent IV, the driver simply increments the IV member of the structure, ensuring that the value always increases. The application can validate that the same IV is never used more than once with the same key pair.
Not all drivers support this method. To query the driver capabilities, call ID3D11VideoDevice::GetContentProtectionCaps and check for the D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK flag in the Caps member of the D3D11_VIDEO_CONTENT_PROTECTION_CAPS structure.
Some drivers might require a separate key to decrypt the data that is read back. To check for this requirement, call GetContentProtectionCaps and check for the D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK_KEY flag. If this flag is present, call ID3D11VideoContext::GetEncryptionBltKey to get the decryption key.
This method has the following limitations:
This function does not honor a D3D11 predicate that may have been set.
If the application uses D3D11 quries, this function may not be accounted for with D3D11_QUERY_EVENT and D3D11_QUERY_TIMESTAMP when using feature levels lower than 11. D3D11_QUERY_PIPELINE_STATISTICS will not include this function for any feature level.
Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).