I’m using UE4.2. I need use encryption/decryption in my project and I try to use FAES::EncryptData and FAES::DecryptData. But when I use them I got an error:
*error LNK2019: unresolved external symbol “public: static void __cdecl FAES::EncryptData(unsigned char *,unsigned int,char *)” (?EncryptData@FAES@@SAXPEAEIPEAD@Z) referenced in function "public: static bool __cdecl UGameplayStaticsEx::SaveGameToSlotWithEncryption(class USaveGame ,class FString const &,int)" (?SaveGameToSlotWithEncryption@UGameplayStaticsEx@@SA_NPEAVUSaveGame@@AEBVFString@@H@Z)
So I guess it is not ready to use, and not included in the core.dll ( the installed version of unreal engine4.2) ?
That’s a pretty standard linker error. I suspect you’re getting it because it has the wrong signature. Searching my local codebase gives me these definitions, though I am on a slightly older version:
I chose to use the last two and I get this error. Actually the first two use a predefined key to make a call of the last two inside their function body respectively. I will try the first two to see whether it works, really doubt that.
I did.
In MyGame.build.cs:
PublicDependencyModuleNames.Add(“Core”);
In the cpp file where I use them: #include “Misc/AES.h”
Could you try to use them in your project and to see how it works, thanks a lot. If I can’t use it,then I need use third party library like CryptoPP, which I’m trying to use with in my game project.