NetSim Source Code Help
Loading...
Searching...
No Matches
AESEncryption.h
Go to the documentation of this file.
1#pragma once
2#ifndef _AESENCRYPTION_H_
3#define _AESENCRYPTION_H_
4#ifndef _CRT_SECURE_NO_DEPRECATE
5#define _CRT_SECURE_NO_DEPRECATE
6#endif
7#ifndef _CRT_SECURE_NO_WARNINGS
8#define _CRT_SECURE_NO_WARNINGS
9#endif
10
11#include <stdio.h>
12#include <stdlib.h>
13#include <string.h>
14#include <stdbool.h>
15#ifdef _WIN32
16#include <Windows.h>
17#include <sal.h>
18#endif
19#include <time.h>
20#include <stdint.h>
21
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#ifdef _WIN32
28#ifndef _AES_CODE_
29#pragma comment(lib,"AESEncryption.lib")
30#define _AES_EXPORT_ _declspec(dllimport)
31#else
32#define _AES_EXPORT_ _declspec(dllexport)
33#endif
34#endif
35#pragma region FILEENCRYPTION
36#ifndef _AES_CODE_
38#else
39typedef struct stru_file_encryption_handle FILEENCRYPTIONHANDLE, * ptrFILEENCRYPTIONHANDLE;
40#endif
41
42_Check_return_
44 _In_z_ char const* _FileName
45);
46
47_Success_(return != -1)
48_Check_return_opt_
49_AES_EXPORT_ int __cdecl close_encrypted_file(
50 _In_ _Post_invalid_ ptrFILEENCRYPTIONHANDLE _Stream
51);
52
53_Success_(return == _Buffer)
54_Check_return_opt_
55_AES_EXPORT_ char* __cdecl read_line_from_encrypted_file(
56 _Out_writes_z_(_MaxCount) char* _Buffer,
57 _In_ int _MaxCount,
59);
60
61_Success_(return == 0)
62_Check_return_opt_
63_AES_EXPORT_ int encrypt_file(
64 _Inout_z_ const char* file,
65 _In_ const char* keyId
66);
67
68#pragma endregion //FILEENCRPTION
69
70#ifdef __cplusplus
71}
72#endif
73#endif //_AESENCRYPTION_H_
_Check_return_ _AES_EXPORT_ ptrFILEENCRYPTIONHANDLE __cdecl open_encrypted_file(_In_z_ char const *_FileName)
void * ptrFILEENCRYPTIONHANDLE
Definition: AESEncryption.h:37
_In_ int _Inout_ ptrFILEENCRYPTIONHANDLE _Stream
Definition: AESEncryption.h:59
_In_ const char * keyId
Definition: AESEncryption.h:66
_Success_(return !=-1) _Check_return_opt_ _AES_EXPORT_ int __cdecl close_encrypted_file(_In_ _Post_invalid_ ptrFILEENCRYPTIONHANDLE _Stream)
_In_ int _MaxCount
Definition: AESEncryption.h:57