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
27 #define WINAPI __stdcall
30 #ifndef __SECSTATUS_DEFINED__
31 typedef LONG SECURITY_STATUS
;
32 #define __SECSTATUS_DEFINED__
35 typedef ULONG_PTR NCRYPT_HANDLE
;
36 typedef ULONG_PTR NCRYPT_PROV_HANDLE
;
37 typedef ULONG_PTR NCRYPT_KEY_HANDLE
;
38 typedef ULONG_PTR NCRYPT_HASH_HANDLE
;
39 typedef ULONG_PTR NCRYPT_SECRET_HANDLE
;
41 #define NCRYPT_KEY_STORAGE_INTERFACE 0x00010001
42 #define NCRYPT_SCHANNEL_INTERFACE 0x00010002
43 #define NCRYPT_SCHANNEL_SIGNATURE_INTERFACE 0x00010003
44 #define NCRYPT_KEY_PROTECTION_INTERFACE 0x00010004
46 SECURITY_STATUS WINAPI
NCryptCreatePersistedKey(NCRYPT_PROV_HANDLE
, NCRYPT_KEY_HANDLE
*, const WCHAR
*, const WCHAR
*, DWORD
, DWORD
);
47 SECURITY_STATUS WINAPI
NCryptDecrypt(NCRYPT_KEY_HANDLE
, BYTE
*, DWORD
, void *, BYTE
*, DWORD
, DWORD
*, DWORD
);
48 SECURITY_STATUS WINAPI
NCryptEncrypt(NCRYPT_KEY_HANDLE
, BYTE
*, DWORD
, void *, BYTE
*, DWORD
, DWORD
*, DWORD
);
49 SECURITY_STATUS WINAPI
NCryptFinalizeKey(NCRYPT_KEY_HANDLE
, DWORD
);
50 SECURITY_STATUS WINAPI
NCryptFreeObject(NCRYPT_HANDLE
);
51 SECURITY_STATUS WINAPI
NCryptOpenKey(NCRYPT_PROV_HANDLE
, NCRYPT_KEY_HANDLE
*, const WCHAR
*, DWORD
, DWORD
);
52 SECURITY_STATUS WINAPI
NCryptOpenStorageProvider(NCRYPT_PROV_HANDLE
*, const WCHAR
*, DWORD
);
58 #endif /* __NCRYPT_H__ */