I’m not getting the FAES encryption to work 
code:
void UMessageSender::BeginPlay()
{
Super::BeginPlay();
// connect to the message bus. this will return nullptr when something fails.
TestEndpoint = FMessageEndpoint::Builder("TestEndpointName").Build();
// TODO: appropriate error handling if something goes wrong :)
UE_LOG(LogTemp, Warning, TEXT("Normal: %s"), *encrpytedStr2);
encrpytedStr2 = EncryptWithAES(*encrpytedStr2, false);
UE_LOG(LogTemp, Warning, TEXT("Encrypted: %s"), *encrpytedStr2);
FString decry = EncryptWithAES(encrpytedStr2, true);
UE_LOG(LogTemp, Warning, TEXT("Decrypted: %s"), *decry);
}
FString UMessageSender::EncryptWithAES(FString InputString, bool Reverse)
{
int32 Size = InputString.Len(); // Calculates length of the input string
TCHAR *String = InputString.GetCharArray().GetData(); // Turn input string...
uint8* BytesString = (uint8*)(String); // ...into byte array
FString Key = "1"; // Choose a key then...
TCHAR *KeyTChar = Key.GetCharArray().GetData(); // ...turn key string...
ANSICHAR *KeyAnsi = (ANSICHAR*)TCHAR_TO_ANSI(KeyTChar); // ...into ANSICHAR array.
if (Reverse) FAES::DecryptData(BytesString, Size, KeyAnsi); // Decrypt or...
else FAES::EncryptData(BytesString, Size, KeyAnsi); // encrypt.
TArray<uint8> EncryptedByteArray; // Define a new array to store the output data
EncryptedByteArray.Append(BytesString, Size); // Move output of the FAES functions to this array
FString output = FBase64::Encode(EncryptedByteArray); // Turn array into FString
return output;
}
project.build.cs
// Fill out your copyright notice in the Description page of Project Settings.
using UnrealBuildTool;
using System.Collections.Generic;
public class ProductSenderEditorTarget : TargetRules
{
public ProductSenderEditorTarget(TargetInfo Target)
{
Type = TargetType.Editor;
}
//
// TargetRules interface.
//
public override void SetupBinaries(
TargetInfo Target,
ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
ref List<string> OutExtraModuleNames
)
{
OutExtraModuleNames.AddRange( new string] { "ProductSender" } );
}
public override void SetupGlobalEnvironment(
TargetInfo Target,
ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration,
ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration
)
{
OutCPPEnvironmentConfiguration.Definitions.Add("AES_KEY=1");
}
}
My results:
LogTemp:Warning: Normal: waazzaaa
LogTemp:Warning: Encrypted: dwBhAGEAegA=
LogTemp:Warning: Decrypted: ZAB3AEIAaABBAEcA
Does anyone have a good example for me or a little video tutorial?
Thank you 
