ReactOS  0.4.15-dev-1171-gab82533
crypt.h
Go to the documentation of this file.
1 /*
2  * Driver routines
3  *
4  * Copyright 2001 - Travis Michielsen
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #ifndef __WINE_CRYPT_H
22 #define __WINE_CRYPT_H
23 
24 #ifndef __REACTOS__
25 #include <stdarg.h>
26 
27 #include "windef.h"
28 #include "winbase.h"
29 #include "wincrypt.h"
30 #endif
31 
32 typedef struct tagPROVFUNCS
33 {
38  BOOL (WINAPI *pCPDestroyHash)(HCRYPTPROV hProv, HCRYPTHASH hHash);
39  BOOL (WINAPI *pCPDestroyKey)(HCRYPTPROV hProv, HCRYPTKEY hKey);
53  BOOL (WINAPI *pCPReleaseContext)(HCRYPTPROV hProv, DWORD dwFlags);
56  BOOL (WINAPI *pCPSetProvParam)(HCRYPTPROV hProv, DWORD dwParam, const BYTE *pbData, DWORD dwFlags);
60 
61 #define MAGIC_CRYPTPROV 0xA39E741F
62 #define MAGIC_CRYPTKEY 0xA39E741E
63 #define MAGIC_CRYPTHASH 0xA39E741D
64 
65 typedef struct tagCRYPTPROV
66 {
71  HCRYPTPROV hPrivate; /*CSP's handle - Should not be given to application under any circumstances!*/
74 
75 typedef struct tagCRYPTKEY
76 {
79  HCRYPTKEY hPrivate; /*CSP's handle - Should not be given to application under any circumstances!*/
81 
82 typedef struct tagCRYPTHASH
83 {
86  HCRYPTHASH hPrivate; /*CSP's handle - Should not be given to application under any circumstances!*/
88 
89 #define MAXPROVTYPES 999
90 
91 extern unsigned char *CRYPT_DEShash( unsigned char *dst, const unsigned char *key,
92  const unsigned char *src ) DECLSPEC_HIDDEN;
93 extern unsigned char *CRYPT_DESunhash( unsigned char *dst, const unsigned char *key,
94  const unsigned char *src ) DECLSPEC_HIDDEN;
95 
96 struct ustring {
97  DWORD Length;
99  unsigned char *Buffer;
100 };
101 
102 NTSTATUS WINAPI SystemFunction032(struct ustring *data, const struct ustring *key);
103 
104 #endif /* __WINE_CRYPT_H_ */
HCRYPTKEY HCRYPTKEY hPubKey
Definition: crypt.h:43
HCRYPTHASH DWORD LPCWSTR sDescription
Definition: crypt.h:57
PCRYPTPROV pProvider
Definition: crypt.h:85
HCRYPTHASH HCRYPTKEY hKey
Definition: crypt.h:51
ALG_ID Algid
Definition: crypt.h:35
HCRYPTKEY HCRYPTKEY DWORD dwBlobType
Definition: crypt.h:43
unsigned int ALG_ID
Definition: wincrypt.h:45
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
ALG_ID HCRYPTHASH hBaseData
Definition: crypt.h:37
struct tagCRYPTKEY * PCRYPTKEY
HCRYPTKEY hPrivate
Definition: crypt.h:79
DWORD MaximumLength
Definition: config.c:21
LONG NTSTATUS
Definition: precomp.h:26
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
HCRYPTKEY HCRYPTHASH BOOL DWORD BYTE DWORD * pdwDataLen
Definition: crypt.h:36
NTSTATUS WINAPI SystemFunction032(struct ustring *data, const struct ustring *key)
Definition: sysfunc.c:533
char * LPSTR
Definition: xmlstorage.h:182
HCRYPTHASH DWORD dwParam
Definition: crypt.h:46
struct tagCRYPTKEY CRYPTKEY
static HCRYPTPROV hProv
Definition: rsaenh.c:32
HCRYPTKEY DWORD const BYTE * pbData
Definition: crypt.h:55
DWORD dwFlags
Definition: crypt.h:53
DWORD Length
Definition: config.c:20
HCRYPTKEY DWORD BYTE DWORD * pdwDataLen
Definition: crypt.h:47
LONG refcount
Definition: crypt.h:68
struct tagCRYPTPROV * PCRYPTPROV
BOOL(WINAPI *pCPAcquireContext)(HCRYPTPROV *phProv
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
HCRYPTPROV hPrivate
Definition: crypt.h:71
HCRYPTHASH DWORD * pdwReserved
Definition: crypt.h:40
HCRYPTHASH const BYTE DWORD dwSigLen
Definition: crypt.h:58
ALG_ID HCRYPTKEY DWORD HCRYPTHASH * phHash
Definition: crypt.h:35
PPROVFUNCS pFuncs
Definition: crypt.h:70
HCRYPTKEY HCRYPTKEY DWORD DWORD BYTE DWORD * pdwDataLen
Definition: crypt.h:43
HCRYPTHASH DWORD DWORD HCRYPTHASH * phHash
Definition: crypt.h:40
HCRYPTHASH const BYTE DWORD HCRYPTKEY LPCWSTR sDescription
Definition: crypt.h:58
ALG_ID DWORD HCRYPTKEY * phKey
Definition: crypt.h:44
PVTableProvStruc pVTable
Definition: crypt.h:72
PCRYPTPROV pProvider
Definition: crypt.h:78
HCRYPTKEY HCRYPTHASH BOOL DWORD BYTE * pbData
Definition: crypt.h:36
struct tagCRYPTHASH * PCRYPTHASH
HMODULE hModule
Definition: crypt.h:69
HCRYPTHASH DWORD LPCWSTR DWORD BYTE DWORD * pdwSigLen
Definition: crypt.h:57
struct tagPROVFUNCS * PPROVFUNCS
HCRYPTHASH DWORD BYTE DWORD * pdwDataLen
Definition: crypt.h:46
const BYTE DWORD HCRYPTKEY DWORD HCRYPTKEY * phKey
Definition: crypt.h:52
DWORD dwMagic
Definition: crypt.h:84
HCRYPTKEY DWORD DWORD HCRYPTKEY * phKey
Definition: crypt.h:41
ALG_ID HCRYPTKEY hKey
Definition: crypt.h:35
HCRYPTHASH DWORD LPCWSTR DWORD BYTE * pbSignature
Definition: crypt.h:57
#define WINAPI
Definition: msvc.h:6
HCRYPTHASH const BYTE * pbData
Definition: crypt.h:50
unsigned long DWORD
Definition: ntddk_ex.h:95
LPSTR DWORD PVTableProvStruc pVTable
Definition: crypt.h:34
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
DWORD dwMagic
Definition: crypt.h:67
DWORD BYTE DWORD * pdwDataLen
Definition: crypt.h:48
DWORD HCRYPTKEY * phUserKey
Definition: crypt.h:49
unsigned char * CRYPT_DESunhash(unsigned char *dst, const unsigned char *key, const unsigned char *src) DECLSPEC_HIDDEN
Definition: crypt_des.c:299
GLenum src
Definition: glext.h:6340
unsigned char BYTE
Definition: xxhash.c:193
struct tagCRYPTHASH CRYPTHASH
ULONG_PTR HCRYPTHASH
Definition: wincrypt.h:50
ULONG_PTR HCRYPTPROV
Definition: wincrypt.h:46
DWORD dwKeySpec
Definition: crypt.h:49
struct tagPROVFUNCS PROVFUNCS
HCRYPTKEY HCRYPTHASH BOOL DWORD BYTE DWORD DWORD dwBufLen
Definition: crypt.h:42
unsigned char * CRYPT_DEShash(unsigned char *dst, const unsigned char *key, const unsigned char *src) DECLSPEC_HIDDEN
Definition: crypt_des.c:259
HCRYPTHASH DWORD const BYTE * pbData
Definition: crypt.h:54
GLenum GLenum dst
Definition: glext.h:6340
Definition: config.c:18
LPSTR DWORD dwFlags
Definition: crypt.h:34
ALG_ID HCRYPTHASH DWORD HCRYPTKEY * phKey
Definition: crypt.h:37
ULONG_PTR HCRYPTKEY
Definition: wincrypt.h:49
HCRYPTHASH hPrivate
Definition: crypt.h:86
HCRYPTHASH const BYTE DWORD dwDataLen
Definition: crypt.h:50
HCRYPTKEY HCRYPTHASH BOOL Final
Definition: crypt.h:36
HCRYPTKEY HCRYPTHASH hHash
Definition: crypt.h:36
DWORD const BYTE * pbData
Definition: crypt.h:56
DWORD dwLen
Definition: crypt.h:45
struct tagCRYPTPROV CRYPTPROV
LPSTR pszContainer
Definition: crypt.h:34
unsigned char * Buffer
Definition: config.c:22
DWORD dwMagic
Definition: crypt.h:77
Definition: path.c:41
DWORD BYTE * pbBuffer
Definition: crypt.h:45