- Fix some spelling problems.
[wine/multimedia.git] / include / wincrypt.h
blobffbb0f5fb4c8ace251f11733bc67190fcc69b27b
1 /*
2 * Copyright (C) 2002 Travis Michielsen
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_WINCRYPT_H
20 #define __WINE_WINCRYPT_H
22 #include "windef.h"
24 /* some typedefs for function parameters */
25 typedef unsigned int ALG_ID;
26 typedef unsigned long HCRYPTPROV;
27 typedef unsigned long HCRYPTKEY;
28 typedef unsigned long HCRYPTHASH;
30 /* CSP Structs */
31 typedef struct _VTableProvStruc {
32 DWORD Version;
33 BOOL (*pFuncVerifyImage)(LPCSTR lpszImage, BYTE *pSigData);
34 BOOL (*pFuncReturnhWnd)(DWORD *phWnd);
35 DWORD dwProvType;
36 BYTE *pbContextInfo;
37 DWORD cbContextInfo;
38 LPSTR pszProvName;
39 } VTableProvStruc, *PVTableProvStruc;
41 typedef struct _CRYPTOAPI_BLOB {
42 DWORD cbData;
43 BYTE* pbData;
44 } CRYPT_INTEGER_BLOB, *PCRYPT_INTEGER_BLOB,
45 CRYPT_UINT_BLOB, *PCRYPT_UINT_BLOB,
46 CRYPT_OBJID_BLOB, *PCRYPT_OBJID_BLOB,
47 CERT_NAME_BLOB, *PCERT_NAME_BLOB,
48 CERT_RDN_VALUE_BLOB, *PCERT_RDN_VALUE_BLOB,
49 CERT_BLOB, *PCERT_BLOB,
50 CRL_BLOB, *PCRL_BLOB,
51 DATA_BLOB, *PDATA_BLOB,
52 CRYPT_DATA_BLOB, *PCRYPT_DATA_BLOB,
53 CRYPT_HASH_BLOB, *PCRYPT_HASH_BLOB,
54 CRYPT_DIGEST_BLOB, *PCRYPT_DIGEST_BLOB,
55 CRYPT_DER_BLOB, *PCRYPT_DER_BLOB,
56 CRYPT_ATTR_BLOB, *PCRYPT_ATTR_BLOB;
58 typedef struct _PUBLICKEYSTRUC {
59 BYTE bType;
60 BYTE bVersion;
61 WORD reserved;
62 ALG_ID aiKeyAlg;
63 } BLOBHEADER, PUBLICKEYSTRUC;
65 /* Algorithm IDs */
67 #define GET_ALG_CLASS(x) (x & (7 << 13))
68 #define GET_ALG_TYPE(x) (x & (15 << 9))
69 #define GET_ALG_SID(x) (x & (511))
71 /* Algorithm Classes */
72 #define ALG_CLASS_ANY (0)
73 #define ALG_CLASS_SIGNATURE (1 << 13)
74 #define ALG_CLASS_MSG_ENCRYPT (2 << 13)
75 #define ALG_CLASS_DATA_ENCRYPT (3 << 13)
76 #define ALG_CLASS_HASH (4 << 13)
77 #define ALG_CLASS_KEY_EXCHANGE (5 << 13)
78 /* Algorithm types */
79 #define ALG_TYPE_ANY (0)
80 #define ALG_TYPE_DSS (1 << 9)
81 #define ALG_TYPE_RSA (2 << 9)
82 #define ALG_TYPE_BLOCK (3 << 9)
83 #define ALG_TYPE_STREAM (4 << 9)
85 /* SIDs */
86 #define ALG_SID_ANY (0)
87 /* RSA SIDs */
88 #define ALG_SID_RSA_ANY 0
89 #define ALG_SID_RSA_PKCS 1
90 #define ALG_SID_RSA_MSATWORK 2
91 #define ALG_SID_RSA_ENTRUST 3
92 #define ALG_SID_RSA_PGP 4
93 /* DSS SIDs */
94 #define ALG_SID_DSS_ANY 0
95 #define ALG_SID_DSS_PKCS 1
96 #define ALG_SID_DSS_DMS 2
98 /* DES SIDs */
99 #define ALG_SID_DES 1
100 #define ALG_SID_3DES 3
101 #define ALG_SID_DESX 4
102 #define ALG_SID_IDEA 5
103 #define ALG_SID_CAST 6
104 #define ALG_SID_SAFERSK64 7
105 #define ALD_SID_SAFERSK128 8
106 /* RC2 SIDs */
107 #define ALG_SID_RC4 1
108 #define ALG_SID_RC2 2
109 #define ALG_SID_SEAL 2
110 /* Hash SIDs */
111 #define ALG_SID_MD2 1
112 #define ALG_SID_MD4 2
113 #define ALG_SID_MD5 3
114 #define ALG_SID_SHA 4
115 #define ALG_SID_MAC 5
116 #define ALG_SID_RIPEMD 6
117 #define ALG_SID_RIPEMD160 7
118 #define ALG_SID_SSL3SHAMD5 8
120 /* Algorithm Definitions */
121 #define CALG_MD2 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD2)
122 #define CALG_MD4 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD4)
123 #define CALG_MD5 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MD5)
124 #define CALG_SHA (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SHA)
125 #define CALG_MAC (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_MAC)
126 #define CALG_RSA_SIGN (ALG_CLASS_SIGNATURE | ALG_TYPE_RSA | ALG_SID_RSA_ANY)
127 #define CALG_DSS_SIGN (ALG_CLASS_SIGNATURE | ALG_TYPE_DSS | ALG_SID_DSS_ANY)
128 #define CALG_RSA_KEYX (ALG_CLASS_KEY_EXCHANGE | ALG_TYPE_RSA | ALG_SID_RSA_ANY)
129 #define CALG_DES (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_DES)
130 #define CALG_RC2 (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_BLOCK | ALG_SID_RC2)
131 #define CALG_RC4 (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_STREAM | ALG_SID_RC4)
132 #define CALG_SEAL (ALG_CLASS_DATA_ENCRYPT | ALG_TYPE_STREAM | ALG_SID_SEAL)
134 /* Provider names */
135 #define MS_DEF_PROV_A "Microsoft Base Cryptographic Provider v1.0"
136 static const WCHAR MS_DEF_PROV_W[] = { 'M','i','c','r','o','s','o','f','t',' ',
137 'B','a','s','e',' ','C','r','y','p','t','o','g','r','a','p','h','i','c',' ',
138 'P','r','o','v','i','d','e','r',' ','v','1','.','0',0 };
139 #define MS_DEF_PROV WINELIB_NAME_AW(MS_DEF_PROV_)
141 #define MS_ENHANCED_PROV_A "Microsoft Enhanced Cryptographic Provider "
142 static const WCHAR MS_ENHANCED_PROV_W[] = { 'M','i','c','r','o','s','o','f','t',' ',
143 'E','n','h','a','n','c','e','d',' ','C','r','y','p','t','o','g','r','a','p','h','i','c',' ',
144 'P','r','o','v','i','d','e','r',' ', 0 };
145 #define MS_ENHANCED_PROV WINELIB_NAME_AW(MS_ENHANCED_PROV_)
147 #define MS_STRONG_PROV_A "Microsoft Strong Cryptographic Provider"
148 static const WCHAR MS_STRONG_PROV_W[] = { 'M','i','c','r','o','s','o','f','t',' ',
149 'S','t','r','o','n','g',' ','C','r','y','p','t','o','g','r','a','p','h','i','c',' ',
150 'P','r','o','v','i','d','e','r',0 };
151 #define MS_STRONG_PROV WINELIB_NAME_AW(MS_STRONG_PROV_)
153 #define MS_DEF_RSA_SIG_PROV_A "Microsoft RSA Signature Cryptographic Provider"
154 static const WCHAR MS_DEF_RSA_SIG_PROV_W[] = { 'M','i','c','r','o','s','o','f','t',' ',
155 'R','S','A',' ','S','i','g','n','a','t','u','r','e',' ',
156 'C','r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r','o','v','i','d','e','r',0 };
157 #define MS_DEF_RSA_SIG_PROV WINELIB_NAME_AW(MS_DEF_RSA_SIG_PROV_)
159 #define MS_DEF_RSA_SCHANNEL_PROV_A "Microsoft RSA SChannel Cryptographic Provider"
160 static const WCHAR MS_DEF_RSA_SCHANNEL_PROV_W[] = { 'M','i','c','r','o','s','o','f','t',' ',
161 'R','S','A',' ','S','C','h','a','n','n','e','l',' ',
162 'C','r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r','o','v','i','d','e','r',0 };
163 #define MS_DEF_RSA_SCHANNEL_PROV WINELIB_NAME_AW(MS_DEF_RSA_SCHANNEL_PROV_)
165 #define MS_DEF_DSS_PROV_A "Microsoft Base DSS Cryptographic Provider"
166 static const WCHAR MS_DEF_DSS_PROV_W[] = { 'M','i','c','r','o','s','o','f','t',' ',
167 'B','a','s','e',' ','D','S','S',' ',
168 'C','r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r','o','v','i','d','e','r',0 };
169 #define MS_DEF_DSS_PROV WINELIB_NAME_AW(MS_DEF_DSS_PROV_)
171 #define MS_DEF_DSS_DH_PROV_A "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider"
172 static const WCHAR MS_DEF_DSS_DH_PROV_W[] = { 'M','i','c','r','o','s','o','f','t',' ',
173 'B','a','s','e',' ','D','S','S',' ','a','n','d',' ',
174 'D','i','f','f','i','e','-','H','e','l','l','m','a','n',' ',
175 'C','r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r','o','v','i','d','e','r',0 };
176 #define MS_DEF_DSS_DH_PROV WINELIB_NAME_AW(MS_DEF_DSS_DH_PROV_)
178 #define MS_ENH_DSS_DH_PROV_A "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider"
179 static const WCHAR MS_ENH_DSS_DH_PROV_W[] = { 'M','i','c','r','o','s','o','f','t',' ',
180 'E','n','h','a','n','c','e','d',' ','D','S','S',' ','a','n','d',' ',
181 'D','i','f','f','i','e','-','H','e','l','l','m','a','n',' ',
182 'C','r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r','o','v','i','d','e','r',0 };
183 #define MS_ENH_DSS_DH_PROV WINELIB_NAME_AW(MS_ENH_DSS_DH_PROV_)
185 #define MS_DEF_DH_SCHANNEL_PROV_A "Microsoft DH SChannel Cryptographic Provider"
186 static const WCHAR MS_DEF_DH_SCHANNEL_PROV_W[] = { 'M','i','c','r','o','s','o','f','t',' ',
187 'D','H',' ','S','C','h','a','n','n','e','l',' ',
188 'C','r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r','o','v','i','d','e','r',0 };
189 #define MS_DEF_DH_SCHANNEL_PROV WINELIB_NAME_AW(MS_DEF_DH_SCHANNEL_PROV_)
191 #define MS_SCARD_PROV_A "Microsoft Base Smart Card Cryptographic Provider"
192 static const WCHAR MS_SCARD_PROV_W[] = { 'M','i','c','r','o','s','o','f','t',' ',
193 'B','a','s','e',' ','S','m','a','r','t',' ','C','a','r','d',' ',
194 'C','r','y','p','t','o','g','r','a','p','h','i','c',' ','P','r','o','v','i','d','e','r',0 };
195 #define MS_SCARD_PROV WINELIB_NAME_AW(MS_SCARD_PROV_)
197 /* Key Specs*/
198 #define AT_KEYEXCHANGE 1
199 #define AT_SIGNATURE 2
201 /* Provider Types */
202 #define PROV_RSA_FULL 1
203 #define PROV_RSA_SIG 2
204 #define PROV_DSS 3
205 #define PROV_FORTEZZA 4
206 #define PROV_MS_EXCHANGE 5
207 #define PROV_SSL 6
208 #define PROV_RSA_SCHANNEL 12
209 #define PROV_DSS_DH 13
210 #define PROV_EC_ECDSA_SIG 14
211 #define PROV_EC_ECNRA_SIG 15
212 #define PROV_EC_ECDSA_FULL 16
213 #define PROV_EC_ECNRA_FULL 17
214 #define PROV_DH_SCHANNEL 18
215 #define PROV_SPYRUS_LYNKS 20
216 #define PROV_RNG 21
217 #define PROV_INTEL_SEC 22
218 #define PROV_REPLACE_OWF 23
219 #define PROV_RSA_AES 24
221 /* FLAGS Section */
223 /* Provider Parameters */
224 #define PP_ENUMALGS 1
225 #define PP_ENUMCONTAINERS 2
226 #define PP_IMPTYPE 3
227 #define PP_NAME 4
228 #define PP_VERSION 5
229 #define PP_CONTAINER 6
231 #define CRYPT_FIRST 1
232 #define CRYPT_NEXT 2
234 #define CRYPT_IMPL_HARDWARE 1
235 #define CRYPT_IMPL_SOFTWARE 2
236 #define CRYPT_IMPL_MIXED 3
237 #define CRYPT_IMPL_UNKNOWN 4
239 /* CryptAcquireContext */
240 #define CRYPT_VERIFYCONTEXT 0xF0000000
241 #define CRYPT_NEWKEYSET 0x00000008
242 #define CRYPT_MACHINE_KEYSET 0x00000000
243 #define CRYPT_DELETEKEYSET 0x00000010
244 #define CRYPT_SILENT 0x00000000
246 /* Crypt{Get|Set}Provider */
247 #define CRYPT_MACHINE_DEFAULT 0x00000001
248 #define CRYPT_USER_DEFAULT 0x00000002
249 #define CRYPT_DELETE_DEFAULT 0x00000004
251 /* Crypt{Get/Set}ProvParam */
252 #define PP_CLIENT_HWND 1
253 #define PP_ENUMALGS 1
254 #define PP_ENUMCONTAINERS 2
255 #define PP_IMPTYPE 3
256 #define PP_NAME 4
257 #define PP_VERSION 5
258 #define PP_CONTAINER 6
259 #define PP_CHANGE_PASSWORD 7
260 #define PP_KEYSET_SEC_DESCR 8
261 #define PP_KEY_TYPE_SUBTYPE 10
262 #define PP_CONTEXT_INFO 11
263 #define PP_KEYEXCHANGE_KEYSIZE 12
264 #define PP_SIGNATURE_KEYSIZE 13
265 #define PP_KEYEXCHANGE_ALG 14
266 #define PP_SIGNATURE_ALG 15
267 #define PP_PROVTYPE 16
268 #define PP_KEYSTORAGE 17
269 #define PP_SYM_KEYSIZE 19
270 #define PP_SESSION_KEYSIZE 20
271 #define PP_UI_PROMPT 21
272 #define PP_ENUMALGS_EX 22
273 #define PP_DELETEKEY 24
274 #define PP_ENUMMANDROOTS 25
275 #define PP_ENUMELECTROOTS 26
276 #define PP_KEYSET_TYPE 27
277 #define PP_ADMIN_PIN 31
278 #define PP_KEYEXCHANGE_PIN 32
279 #define PP_SIGNATURE_PIN 33
280 #define PP_SIG_KEYSIZE_INC 34
281 #define PP_KEYX_KEYSIZE_INC 35
282 #define PP_UNIQUE_CONTAINER 36
283 #define PP_SGC_INFO 37
284 #define PP_USE_HARDWARE_RNG 38
285 #define PP_KEYSPEC 39
286 #define PP_ENUMEX_SIGNING_PROT 40
288 /* CryptSignHash/CryptVerifySignature */
289 #define CRYPT_NOHASHOID 0x00000001
290 #define CRYPT_TYPE2_FORMAT 0x00000002
291 #define CRYPT_X931_FORMAT 0x00000004
293 /* Crypt*Key */
294 #define CRYPT_EXPORTABLE 0x00000001
295 #define CRYPT_USER_PROTECTED 0x00000002
296 #define CRYPT_CREATE_SALT 0x00000004
297 #define CRYPT_UPDATE_KEY 0x00000008
298 #define CRYPT_NO_SALT 0x00000010
299 #define CRYPT_PREGEN 0x00000040
300 #define CRYPT_ARCHIVABLE 0x00004000
301 #define CRYPT_SSL2_FALLBACK 0x00000002
302 #define CRYPT_DESTROYKEY 0x00000004
303 #define CRYPT_OAEP 0x00000040
305 /* Blob Types */
306 #define SIMPLEBLOB 0x1
307 #define PUBLICKEYBLOB 0x6
308 #define PRIVATEKEYBLOB 0x7
309 #define PLAINTEXTKEYBLOB 0x8
310 #define OPAQUEKEYBLOB 0x9
311 #define PUBLICKEYBLOBEX 0xA
312 #define SYMMETRICWRAPKEYBLOB 0xB
314 /* function declarations */
315 /* advapi32.dll */
316 BOOL WINAPI CryptAcquireContextA(HCRYPTPROV *phProv, LPCSTR pszContainer,
317 LPCSTR pszProvider, DWORD dwProvType,
318 DWORD dwFlags);
319 BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
320 LPCWSTR pszProvider, DWORD dwProvType, DWORD dwFlags);
321 #define CryptAcquireContext WINELIB_NAME_AW(CryptAcquireContext)
322 BOOL WINAPI CryptGenRandom (HCRYPTPROV hProv, DWORD dwLen, BYTE *pbBuffer);
323 BOOL WINAPI CryptContextAddRef (HCRYPTPROV hProv, DWORD *pdwReserved, DWORD dwFlags);
324 BOOL WINAPI CryptCreateHash (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey,
325 DWORD dwFlags, HCRYPTHASH *phHash);
326 BOOL WINAPI CryptDecrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final,
327 DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen);
328 BOOL WINAPI CryptDeriveKey (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTHASH hBaseData,
329 DWORD dwFlags, HCRYPTKEY *phKey);
330 BOOL WINAPI CryptDestroyHash (HCRYPTHASH hHash);
331 BOOL WINAPI CryptDestroyKey (HCRYPTKEY hKey);
332 BOOL WINAPI CryptDuplicateKey (HCRYPTKEY hKey, DWORD *pdwReserved, DWORD dwFlags, HCRYPTKEY *phKey);
333 BOOL WINAPI CryptDuplicateHash (HCRYPTHASH hHash, DWORD *pdwReserved,
334 DWORD dwFlags, HCRYPTHASH *phHash);
335 BOOL WINAPI CryptEncrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final,
336 DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen, DWORD dwBufLen);
337 BOOL WINAPI CryptEnumProvidersA (DWORD dwIndex, DWORD *pdwReserved,
338 DWORD dwFlags, DWORD *pdwProvType, LPSTR pszProvName, DWORD *pcbProvName);
339 BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved,
340 DWORD dwFlags, DWORD *pdwProvType, LPWSTR pszProvName, DWORD *pcbProvName);
341 #define CryptEnumProviders WINELIB_NAME_AW(CryptEnumProviders)
342 BOOL WINAPI CryptEnumProviderTypesA (DWORD dwIndex, DWORD *pdwReserved,
343 DWORD dwFlags, DWORD *pdwProvType, LPSTR pszTypeName, DWORD *pcbTypeName);
344 BOOL WINAPI CryptEnumProviderTypesW (DWORD dwIndex, DWORD *pdwReserved,
345 DWORD dwFlags, DWORD *pdwProvType, LPWSTR pszTypeName, DWORD *pcbTypeName);
346 #define CryptEnumProviderTypes WINELIB_NAME_AW(CryptEnumProviderTypes)
347 BOOL WINAPI CryptExportKey (HCRYPTKEY hKey, HCRYPTKEY hExpKey, DWORD dwBlobType,
348 DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen);
349 BOOL WINAPI CryptGenKey (HCRYPTPROV hProv, ALG_ID Algid, DWORD dwFlags, HCRYPTKEY *phKey);
350 BOOL WINAPI CryptGetKeyParam (HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData,
351 DWORD *pdwDataLen, DWORD dwFlags);
352 BOOL WINAPI CryptGetHashParam (HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData,
353 DWORD *pdwDataLen, DWORD dwFlags);
354 BOOL WINAPI CryptGetProvParam (HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData,
355 DWORD *pdwDataLen, DWORD dwFlags);
356 BOOL WINAPI CryptGetDefaultProviderA (DWORD dwProvType, DWORD *pdwReserved,
357 DWORD dwFlags, LPSTR pszProvName, DWORD *pcbProvName);
358 BOOL WINAPI CryptGetDefaultProviderW (DWORD dwProvType, DWORD *pdwReserved,
359 DWORD dwFlags, LPWSTR pszProvName, DWORD *pcbProvName);
360 #define CryptGetDefaultProvider WINELIB_NAME_AW(CryptGetDefaultProvider)
361 BOOL WINAPI CryptGetUserKey (HCRYPTPROV hProv, DWORD dwKeySpec, HCRYPTKEY *phUserKey);
362 BOOL WINAPI CryptHashData (HCRYPTHASH hHash, BYTE *pbData, DWORD dwDataLen, DWORD dwFlags);
363 BOOL WINAPI CryptHashSessionKey (HCRYPTHASH hHash, HCRYPTKEY hKey, DWORD dwFlags);
364 BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, BYTE *pbData, DWORD dwDataLen,
365 HCRYPTKEY hPubKey, DWORD dwFlags, HCRYPTKEY *phKey);
366 BOOL WINAPI CryptReleaseContext (HCRYPTPROV hProv, DWORD dwFlags);
367 BOOL WINAPI CryptSignHashA (HCRYPTHASH hHash, DWORD dwKeySpec, LPCSTR sDescription,
368 DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen);
369 /*BOOL WINAPI CryptSignHashW (HCRYPTHASH hHash, DWORD dwKeySpec, LPCWSTR sDescription,
370 DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen);*/
371 #define CryptSignHashW(hHash, dwKeySpec, sDescription, dwFlags, pbSignature, pdwSigLen) \\
372 CryptSignHashA(hHash, dwKeySpec, (LPCSTR)sDescription, dwFlags, pbSignature, pdwSigLen)
373 #define CryptSignHash WINELIB_NAME_AW(CryptSignHash)
374 BOOL WINAPI CryptSetHashParam (HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData, DWORD dwFlags);
375 BOOL WINAPI CryptSetKeyParam (HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData, DWORD dwFlags);
376 BOOL WINAPI CryptSetProviderA (LPCSTR pszProvName, DWORD dwProvType);
377 BOOL WINAPI CryptSetProviderW (LPCWSTR pszProvName, DWORD dwProvType);
378 #define CryptSetProvider WINELIB_NAME_AW(CryptSetProvider)
379 BOOL WINAPI CryptSetProviderExA (LPCSTR pszProvName, DWORD dwProvType, DWORD *pdwReserved, DWORD dwFlags);
380 BOOL WINAPI CryptSetProviderExW (LPCWSTR pszProvName, DWORD dwProvType, DWORD *pdwReserved, DWORD dwFlags);
381 #define CryptSetProviderEx WINELIB_NAME_AW(CryptSetProviderEx)
382 BOOL WINAPI CryptSetProvParam (HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData, DWORD dwFlags);
383 BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, BYTE *pbSignature, DWORD dwSigLen,
384 HCRYPTKEY hPubKey, LPCSTR sDescription, DWORD dwFlags);
385 /*BOOL WINAPI CryptVerifySignatureW (HCRYPTHASH hHash, BYTE *pbSignature, DWORD dwSigLen,
386 HCRYPTKEY hPubKey, LPCWSTR sDescription, DWORD dwFlags);*/
387 #define CryptVerifySignatureW(hHash, pbSignature, dwSigLen, hPubKey, sDescription, dwFlags) \\
388 CryptVerifySignatureA(hHash, pbSignature, dwSigLen, hPubKey, (LPCSTR)sDescription, dwFlags)
389 #define CryptVerifySignature WINELIB_NAME_AW(CryptVerifySignature)
391 #endif