This method encrypts the wide string with an XOR cipher and returns the result.
Parameter | Description |
---|---|
key | encryption key |
Returns the encrypted string.
#include "UltraEngine.h"
using namespace UltraEngine;
int main(int argc, const char* argv[])
{
WString password = "HaikuMockingBonanzaTumble";
WString key = "d'U0)Ez[^?2?=^X|y49dKurq9mASp`5}";
WString encrypted = password.Xor(key);
Print("Encrypted string: " + encrypted);
WString decrypted = encrypted.Xor(key);
Print("Decrypted string: " + decrypted);
return 0;
}