msvcrt: Import _hypotf implementation from musl.
[wine.git] / include / ncrypt.h
blob111693f1d494fb755ca0694abd807fa93d4d0551
1 /*
2 * Copyright (c) 2016 Austin English
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __NCRYPT_H__
20 #define __NCRYPT_H__
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 #ifndef WINAPI
27 #define WINAPI __stdcall
28 #endif
30 #ifndef __SECSTATUS_DEFINED__
31 typedef LONG SECURITY_STATUS;
32 #define __SECSTATUS_DEFINED__
33 #endif
35 typedef struct _NCryptAlgorithmName {
36 LPWSTR pszName;
37 DWORD dwClass;
38 DWORD dwAlgOperations;
39 DWORD dwFlags;
40 } NCryptAlgorithmName;
42 typedef struct _NCryptBuffer {
43 ULONG cbBuffer;
44 ULONG BufferType;
45 PVOID pvBuffer;
46 } NCryptBuffer, *PNCryptBuffer;
48 typedef struct _NCryptBufferDesc {
49 ULONG ulVersion;
50 ULONG cBuffers;
51 PNCryptBuffer pBuffers;
52 } NCryptBufferDesc, *PNCryptBufferDesc;
54 typedef struct NCryptKeyName {
55 LPWSTR pszName;
56 LPWSTR pszAlgid;
57 DWORD dwLegacyKeySpec;
58 DWORD dwFlags;
59 } NCryptKeyName;
61 typedef ULONG_PTR NCRYPT_HANDLE;
62 typedef ULONG_PTR NCRYPT_PROV_HANDLE;
63 typedef ULONG_PTR NCRYPT_KEY_HANDLE;
64 typedef ULONG_PTR NCRYPT_HASH_HANDLE;
65 typedef ULONG_PTR NCRYPT_SECRET_HANDLE;
67 #define NCRYPT_KEY_STORAGE_INTERFACE 0x00010001
68 #define NCRYPT_SCHANNEL_INTERFACE 0x00010002
69 #define NCRYPT_SCHANNEL_SIGNATURE_INTERFACE 0x00010003
70 #define NCRYPT_KEY_PROTECTION_INTERFACE 0x00010004
72 SECURITY_STATUS WINAPI NCryptCreatePersistedKey(NCRYPT_PROV_HANDLE, NCRYPT_KEY_HANDLE *, const WCHAR *, const WCHAR *, DWORD, DWORD);
73 SECURITY_STATUS WINAPI NCryptDecrypt(NCRYPT_KEY_HANDLE, BYTE *, DWORD, void *, BYTE *, DWORD, DWORD *, DWORD);
74 SECURITY_STATUS WINAPI NCryptEncrypt(NCRYPT_KEY_HANDLE, BYTE *, DWORD, void *, BYTE *, DWORD, DWORD *, DWORD);
75 SECURITY_STATUS WINAPI NCryptFinalizeKey(NCRYPT_KEY_HANDLE, DWORD);
76 SECURITY_STATUS WINAPI NCryptFreeObject(NCRYPT_HANDLE);
77 SECURITY_STATUS WINAPI NCryptOpenKey(NCRYPT_PROV_HANDLE, NCRYPT_KEY_HANDLE *, const WCHAR *, DWORD, DWORD);
78 SECURITY_STATUS WINAPI NCryptOpenStorageProvider(NCRYPT_PROV_HANDLE *, const WCHAR *, DWORD);
80 #ifdef __cplusplus
82 #endif
84 #endif /* __NCRYPT_H__ */