encrypt file with aes 256 using OPEN SSL library

  aes, c++, cbc-mode, encryption, openssl

i’m trying to encrypt file by openssl and a got this errors

Severity Code Description Project File Line Suppression State
Error C4996 ‘strcpy’: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ConsoleApplication1 C:UsersdellsourcereposConsoleApplication1ConsoleApplication1ConsoleApplication1.cpp 43

to resolve i add this commad

#define _CRT_SECURE_NO_DEPRECATE

and i got this errors:
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol AES_set_encrypt_key referenced in function "class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl cipher_AES(class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::basic_string<char,struct std::char_traits,class std::allocator >)" ([email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@Z) ConsoleApplication1 C:UsersdellsourcereposConsoleApplication1ConsoleApplication1ConsoleApplication1.obj 1

what can i do? sorry,because my english not good

Source: Windows Questions C++

LEAVE A COMMENT