ReactOS 0.4.15-dev-8348-gc1b9bb5
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
32typedef struct tagPROVFUNCS
33{
53 BOOL (WINAPI *pCPReleaseContext)(HCRYPTPROV hProv, DWORD dwFlags);
60
61#define MAGIC_CRYPTPROV 0xA39E741F
62#define MAGIC_CRYPTKEY 0xA39E741E
63#define MAGIC_CRYPTHASH 0xA39E741D
64
65typedef struct tagCRYPTPROV
66{
71 HCRYPTPROV hPrivate; /*CSP's handle - Should not be given to application under any circumstances!*/
74
75typedef struct tagCRYPTKEY
76{
79 HCRYPTKEY hPrivate; /*CSP's handle - Should not be given to application under any circumstances!*/
81
82typedef struct tagCRYPTHASH
83{
86 HCRYPTHASH hPrivate; /*CSP's handle - Should not be given to application under any circumstances!*/
88
89#define MAXPROVTYPES 999
90
91extern unsigned char *CRYPT_DEShash( unsigned char *dst, const unsigned char *key,
92 const unsigned char *src ) DECLSPEC_HIDDEN;
93extern unsigned char *CRYPT_DESunhash( unsigned char *dst, const unsigned char *key,
94 const unsigned char *src ) DECLSPEC_HIDDEN;
95
96struct ustring {
99 unsigned char *Buffer;
100};
101
102NTSTATUS WINAPI SystemFunction032(struct ustring *data, const struct ustring *key);
103
104#endif /* __WINE_CRYPT_H_ */
LONG NTSTATUS
Definition: precomp.h:26
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
struct tagPROVFUNCS PROVFUNCS
unsigned char * CRYPT_DESunhash(unsigned char *dst, const unsigned char *key, const unsigned char *src) DECLSPEC_HIDDEN
Definition: crypt_des.c:299
NTSTATUS WINAPI SystemFunction032(struct ustring *data, const struct ustring *key)
Definition: sysfunc.c:533
struct tagCRYPTPROV * PCRYPTPROV
struct tagCRYPTHASH CRYPTHASH
unsigned char * CRYPT_DEShash(unsigned char *dst, const unsigned char *key, const unsigned char *src) DECLSPEC_HIDDEN
Definition: crypt_des.c:259
struct tagPROVFUNCS * PPROVFUNCS
struct tagCRYPTKEY CRYPTKEY
struct tagCRYPTHASH * PCRYPTHASH
struct tagCRYPTPROV CRYPTPROV
struct tagCRYPTKEY * PCRYPTKEY
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
static HCRYPTPROV hProv
Definition: rsaenh.c:32
#define BOOL
Definition: nt_native.h:43
long LONG
Definition: pedump.c:60
Definition: copy.c:22
PCRYPTPROV pProvider
Definition: crypt.h:85
HCRYPTHASH hPrivate
Definition: crypt.h:86
DWORD dwMagic
Definition: crypt.h:84
HCRYPTKEY hPrivate
Definition: crypt.h:79
DWORD dwMagic
Definition: crypt.h:77
PCRYPTPROV pProvider
Definition: crypt.h:78
HMODULE hModule
Definition: crypt.h:69
PVTableProvStruc pVTable
Definition: crypt.h:72
PPROVFUNCS pFuncs
Definition: crypt.h:70
HCRYPTPROV hPrivate
Definition: crypt.h:71
LONG refcount
Definition: crypt.h:68
DWORD dwMagic
Definition: crypt.h:67
BOOL(WINAPI *pCPDecrypt)(HCRYPTPROV hProv
ALG_ID HCRYPTHASH DWORD HCRYPTKEY * phKey
Definition: crypt.h:37
BOOL(WINAPI *pCPImportKey)(HCRYPTPROV hProv
BOOL(WINAPI *pCPExportKey)(HCRYPTPROV hProv
HCRYPTKEY HCRYPTKEY DWORD dwBlobType
Definition: crypt.h:43
BOOL(WINAPI *pCPDestroyKey)(HCRYPTPROV hProv
HCRYPTHASH DWORD LPCWSTR DWORD BYTE * pbSignature
Definition: crypt.h:57
HCRYPTHASH DWORD LPCWSTR sDescription
Definition: crypt.h:57
BOOL(WINAPI *pCPSetHashParam)(HCRYPTPROV hProv
LPSTR DWORD PVTableProvStruc pVTable
Definition: crypt.h:34
HCRYPTKEY HCRYPTHASH hHash
Definition: crypt.h:36
ALG_ID HCRYPTKEY hKey
Definition: crypt.h:35
HCRYPTHASH DWORD * pdwReserved
Definition: crypt.h:40
BOOL(WINAPI *pCPVerifySignature)(HCRYPTPROV hProv
ALG_ID Algid
Definition: crypt.h:35
HCRYPTHASH const BYTE DWORD dwDataLen
Definition: crypt.h:50
BOOL(WINAPI *pCPGenRandom)(HCRYPTPROV hProv
BOOL(WINAPI *pCPSetProvParam)(HCRYPTPROV hProv
HCRYPTHASH DWORD dwParam
Definition: crypt.h:46
HCRYPTHASH DWORD LPCWSTR DWORD BYTE DWORD * pdwSigLen
Definition: crypt.h:57
BOOL(WINAPI *pCPReleaseContext)(HCRYPTPROV hProv
BOOL(WINAPI *pCPGetUserKey)(HCRYPTPROV hProv
HCRYPTKEY HCRYPTKEY hPubKey
Definition: crypt.h:43
BOOL(WINAPI *pCPDeriveKey)(HCRYPTPROV hProv
HCRYPTKEY HCRYPTHASH BOOL DWORD BYTE * pbData
Definition: crypt.h:36
BOOL(WINAPI *pCPSignHash)(HCRYPTPROV hProv
DWORD HCRYPTKEY * phUserKey
Definition: crypt.h:49
BOOL(WINAPI *pCPSetKeyParam)(HCRYPTPROV hProv
HCRYPTHASH const BYTE DWORD dwSigLen
Definition: crypt.h:58
DWORD dwLen
Definition: crypt.h:45
BOOL(WINAPI *pCPHashData)(HCRYPTPROV hProv
BOOL(WINAPI *pCPGenKey)(HCRYPTPROV hProv
HCRYPTKEY HCRYPTHASH BOOL DWORD BYTE DWORD * pdwDataLen
Definition: crypt.h:36
BOOL(WINAPI *pCPDestroyHash)(HCRYPTPROV hProv
BOOL(WINAPI *pCPAcquireContext)(HCRYPTPROV *phProv
ALG_ID HCRYPTKEY DWORD HCRYPTHASH * phHash
Definition: crypt.h:35
BOOL(WINAPI *pCPGetProvParam)(HCRYPTPROV hProv
BOOL(WINAPI *pCPGetHashParam)(HCRYPTPROV hProv
BOOL(WINAPI *pCPEncrypt)(HCRYPTPROV hProv
BOOL(WINAPI *pCPHashSessionKey)(HCRYPTPROV hProv
DWORD dwKeySpec
Definition: crypt.h:49
DWORD BYTE * pbBuffer
Definition: crypt.h:45
ALG_ID HCRYPTHASH hBaseData
Definition: crypt.h:37
BOOL(WINAPI *pCPDuplicateKey)(HCRYPTPROV hUID
LPSTR DWORD dwFlags
Definition: crypt.h:34
HCRYPTKEY HCRYPTHASH BOOL DWORD BYTE DWORD DWORD dwBufLen
Definition: crypt.h:42
LPSTR pszContainer
Definition: crypt.h:34
BOOL(WINAPI *pCPGetKeyParam)(HCRYPTPROV hProv
BOOL(WINAPI *pCPDuplicateHash)(HCRYPTPROV hUID
HCRYPTKEY HCRYPTHASH BOOL Final
Definition: crypt.h:36
Definition: config.c:19
DWORD Length
Definition: config.c:20
DWORD MaximumLength
Definition: config.c:21
unsigned char * Buffer
Definition: config.c:22
ULONG_PTR HCRYPTPROV
Definition: wincrypt.h:46
ULONG_PTR HCRYPTHASH
Definition: wincrypt.h:50
ULONG_PTR HCRYPTKEY
Definition: wincrypt.h:49
unsigned int ALG_ID
Definition: wincrypt.h:45
#define WINAPI
Definition: msvc.h:6
char * LPSTR
Definition: xmlstorage.h:182
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193