Class: String
Lua
C++
Edit

String::Xor

This method encrypts the string with an XOR cipher and returns the result.

Syntax

Parameter Description
key encryption key

Returns

Returns the encrypted string.

Example

#include "UltraEngine.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    String password = "HaikuMockingBonanzaTumble";
    String key = "d'U0)Ez[^?2?=^X|y49dKurq9mASp`5}";
    String encrypted = password.Xor(key);

    Print("Encrypted string: " + encrypted);

    String decrypted = encrypted.Xor(key);
    Print("Decrypted string: " + decrypted);

    return 0;
}
Copyright © 2024 Ultra Software.
All rights reserved.