1 /*
2 * Copyright 2011 Joakim Sindholt <[email protected]>
3 * SPDX-License-Identifier: MIT
4 */
5
6 #ifndef _NINE_CRYPTOSESSION9_H_
7 #define _NINE_CRYPTOSESSION9_H_
8
9 #include "iunknown.h"
10
11 struct NineCryptoSession9
12 {
13 struct NineUnknown base;
14 };
15 static inline struct NineCryptoSession9 *
NineCryptoSession9(void * data)16 NineCryptoSession9( void *data )
17 {
18 return (struct NineCryptoSession9 *)data;
19 }
20
21 HRESULT NINE_WINAPI
22 NineCryptoSession9_GetCertificateSize( struct NineCryptoSession9 *This,
23 UINT *pCertificateSize );
24
25 HRESULT NINE_WINAPI
26 NineCryptoSession9_GetCertificate( struct NineCryptoSession9 *This,
27 UINT CertifacteSize,
28 BYTE *ppCertificate );
29
30 HRESULT NINE_WINAPI
31 NineCryptoSession9_NegotiateKeyExchange( struct NineCryptoSession9 *This,
32 UINT DataSize,
33 void *pData );
34
35 HRESULT NINE_WINAPI
36 NineCryptoSession9_EncryptionBlt( struct NineCryptoSession9 *This,
37 IDirect3DSurface9 *pSrcSurface,
38 IDirect3DSurface9 *pDstSurface,
39 UINT DstSurfaceSize,
40 void *pIV );
41
42 HRESULT NINE_WINAPI
43 NineCryptoSession9_DecryptionBlt( struct NineCryptoSession9 *This,
44 IDirect3DSurface9 *pSrcSurface,
45 IDirect3DSurface9 *pDstSurface,
46 UINT SrcSurfaceSize,
47 D3DENCRYPTED_BLOCK_INFO *pEncryptedBlockInfo,
48 void *pContentKey,
49 void *pIV );
50
51 HRESULT NINE_WINAPI
52 NineCryptoSession9_GetSurfacePitch( struct NineCryptoSession9 *This,
53 IDirect3DSurface9 *pSrcSurface,
54 UINT *pSurfacePitch );
55
56 HRESULT NINE_WINAPI
57 NineCryptoSession9_StartSessionKeyRefresh( struct NineCryptoSession9 *This,
58 void *pRandomNumber,
59 UINT RandomNumberSize );
60
61 HRESULT NINE_WINAPI
62 NineCryptoSession9_FinishSessionKeyRefresh( struct NineCryptoSession9 *This );
63
64 HRESULT NINE_WINAPI
65 NineCryptoSession9_GetEncryptionBltKey( struct NineCryptoSession9 *This,
66 void *pReadbackKey,
67 UINT KeySize );
68
69 #endif /* _NINE_CRYPTOSESSION9_H_ */
70