ReactOS  0.4.14-dev-606-g14ebc0b
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 //#include <stdarg.h>
25 
26 //#include "windef.h"
27 //#include "winbase.h"
28 //#include "wincrypt.h"
29 
30 typedef struct tagPROVFUNCS
31 {
36  BOOL (WINAPI *pCPDestroyHash)(HCRYPTPROV hProv, HCRYPTHASH hHash);
37  BOOL (WINAPI *pCPDestroyKey)(HCRYPTPROV hProv, HCRYPTKEY hKey);
51  BOOL (WINAPI *pCPReleaseContext)(HCRYPTPROV hProv, DWORD dwFlags);
54  BOOL (WINAPI *pCPSetProvParam)(HCRYPTPROV hProv, DWORD dwParam, const BYTE *pbData, DWORD dwFlags);
58 
59 #define MAGIC_CRYPTPROV 0xA39E741F
60 #define MAGIC_CRYPTKEY 0xA39E741E
61 #define MAGIC_CRYPTHASH 0xA39E741D
62 
63 typedef struct tagCRYPTPROV
64 {
69  HCRYPTPROV hPrivate; /*CSP's handle - Should not be given to application under any circumstances!*/
72 
73 typedef struct tagCRYPTKEY
74 {
77  HCRYPTKEY hPrivate; /*CSP's handle - Should not be given to application under any circumstances!*/
79 
80 typedef struct tagCRYPTHASH
81 {
84  HCRYPTHASH hPrivate; /*CSP's handle - Should not be given to application under any circumstances!*/
86 
87 #define MAXPROVTYPES 999
88 
89 extern unsigned char *CRYPT_DEShash( unsigned char *dst, const unsigned char *key,
90  const unsigned char *src ) DECLSPEC_HIDDEN;
91 extern unsigned char *CRYPT_DESunhash( unsigned char *dst, const unsigned char *key,
92  const unsigned char *src ) DECLSPEC_HIDDEN;
93 
94 struct ustring {
95  DWORD Length;
97  unsigned char *Buffer;
98 };
99 
100 NTSTATUS WINAPI SystemFunction032(struct ustring *data, const struct ustring *key);
101 
102 #endif /* __WINE_CRYPT_H_ */
HCRYPTKEY HCRYPTKEY hPubKey
Definition: crypt.h:41
HCRYPTHASH DWORD LPCWSTR sDescription
Definition: crypt.h:55
PCRYPTPROV pProvider
Definition: crypt.h:83
HCRYPTHASH HCRYPTKEY hKey
Definition: crypt.h:49
ALG_ID Algid
Definition: crypt.h:33
HCRYPTKEY HCRYPTKEY DWORD dwBlobType
Definition: crypt.h:41
unsigned int ALG_ID
Definition: wincrypt.h:45
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
ALG_ID HCRYPTHASH hBaseData
Definition: crypt.h:35
struct tagCRYPTKEY * PCRYPTKEY
HCRYPTKEY hPrivate
Definition: crypt.h:77
DWORD MaximumLength
Definition: config.c:21
LONG NTSTATUS
Definition: precomp.h:26
HCRYPTKEY HCRYPTHASH BOOL DWORD BYTE DWORD * pdwDataLen
Definition: crypt.h:34
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:44
struct tagCRYPTKEY CRYPTKEY
static HCRYPTPROV hProv
Definition: rsaenh.c:32
HCRYPTKEY DWORD const BYTE * pbData
Definition: crypt.h:53
DWORD dwFlags
Definition: crypt.h:51
DWORD Length
Definition: config.c:20
HCRYPTKEY DWORD BYTE DWORD * pdwDataLen
Definition: crypt.h:45
struct tagCRYPTPROV * PCRYPTPROV
BOOL(WINAPI *pCPAcquireContext)(HCRYPTPROV *phProv
unsigned int BOOL
Definition: ntddk_ex.h:94
HCRYPTPROV hPrivate
Definition: crypt.h:69
HCRYPTHASH DWORD * pdwReserved
Definition: crypt.h:38
HCRYPTHASH const BYTE DWORD dwSigLen
Definition: crypt.h:56
ALG_ID HCRYPTKEY DWORD HCRYPTHASH * phHash
Definition: crypt.h:33
PPROVFUNCS pFuncs
Definition: crypt.h:68
HCRYPTKEY HCRYPTKEY DWORD DWORD BYTE DWORD * pdwDataLen
Definition: crypt.h:41
HCRYPTHASH DWORD DWORD HCRYPTHASH * phHash
Definition: crypt.h:38
UINT refcount
Definition: crypt.h:66
HCRYPTHASH const BYTE DWORD HCRYPTKEY LPCWSTR sDescription
Definition: crypt.h:56
ALG_ID DWORD HCRYPTKEY * phKey
Definition: crypt.h:42
PVTableProvStruc pVTable
Definition: crypt.h:70
PCRYPTPROV pProvider
Definition: crypt.h:76
HCRYPTKEY HCRYPTHASH BOOL DWORD BYTE * pbData
Definition: crypt.h:34
struct tagCRYPTHASH * PCRYPTHASH
HMODULE hModule
Definition: crypt.h:67
HCRYPTHASH DWORD LPCWSTR DWORD BYTE DWORD * pdwSigLen
Definition: crypt.h:55
struct tagPROVFUNCS * PPROVFUNCS
HCRYPTHASH DWORD BYTE DWORD * pdwDataLen
Definition: crypt.h:44
const BYTE DWORD HCRYPTKEY DWORD HCRYPTKEY * phKey
Definition: crypt.h:50
DWORD dwMagic
Definition: crypt.h:82
HCRYPTKEY DWORD DWORD HCRYPTKEY * phKey
Definition: crypt.h:39
ALG_ID HCRYPTKEY hKey
Definition: crypt.h:33
HCRYPTHASH DWORD LPCWSTR DWORD BYTE * pbSignature
Definition: crypt.h:55
#define WINAPI
Definition: msvc.h:6
HCRYPTHASH const BYTE * pbData
Definition: crypt.h:48
unsigned long DWORD
Definition: ntddk_ex.h:95
LPSTR DWORD PVTableProvStruc pVTable
Definition: crypt.h:32
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
DWORD dwMagic
Definition: crypt.h:65
DWORD BYTE DWORD * pdwDataLen
Definition: crypt.h:46
DWORD HCRYPTKEY * phUserKey
Definition: crypt.h:47
unsigned char BYTE
Definition: mem.h:68
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
struct tagCRYPTHASH CRYPTHASH
ULONG_PTR HCRYPTHASH
Definition: wincrypt.h:50
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
ULONG_PTR HCRYPTPROV
Definition: wincrypt.h:46
DWORD dwKeySpec
Definition: crypt.h:47
struct tagPROVFUNCS PROVFUNCS
HCRYPTKEY HCRYPTHASH BOOL DWORD BYTE DWORD DWORD dwBufLen
Definition: crypt.h:40
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:52
GLenum GLenum dst
Definition: glext.h:6340
Definition: config.c:18
LPSTR DWORD dwFlags
Definition: crypt.h:32
unsigned int UINT
Definition: ndis.h:50
ALG_ID HCRYPTHASH DWORD HCRYPTKEY * phKey
Definition: crypt.h:35
ULONG_PTR HCRYPTKEY
Definition: wincrypt.h:49
HCRYPTHASH hPrivate
Definition: crypt.h:84
HCRYPTHASH const BYTE DWORD dwDataLen
Definition: crypt.h:48
HCRYPTKEY HCRYPTHASH BOOL Final
Definition: crypt.h:34
HCRYPTKEY HCRYPTHASH hHash
Definition: crypt.h:34
DWORD const BYTE * pbData
Definition: crypt.h:54
DWORD dwLen
Definition: crypt.h:43
struct tagCRYPTPROV CRYPTPROV
LPSTR pszContainer
Definition: crypt.h:32
unsigned char * Buffer
Definition: config.c:22
DWORD dwMagic
Definition: crypt.h:75
Definition: path.c:41
DWORD BYTE * pbBuffer
Definition: crypt.h:43