About Store Forum Documentation Contact



Post Reply 
[SOLVED] Str class -> help needed... (encryption)
Author Message
Fluxor Offline
Member

Post: #1
[SOLVED] Str class -> help needed... (encryption)
Hey there.

How can I realize this function with Esenthels Str class?
(without the std stuff)

Code:
string encryptDecrypt(string toEncrypt) {
    char key = 'K';
    string output = toEncrypt;
    
    for (int i = 0; i < toEncrypt.size(); i++)
        output[i] = toEncrypt[i] ^ key;
    return output;
}


Any ideas? Tried for quite a while now, can't get it working.

(I just would like to lightly encrypt .dat files with savegame data so that
it isn't too easy for basically anyone to view/edit them.)



Thanks,
tL.
(This post was last modified: 08-26-2021 09:08 PM by Fluxor.)
08-25-2021 02:59 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Str class -> help needed... (encryption)
08-25-2021 04:47 AM
Find all posts by this user Quote this message in a reply
Fluxor Offline
Member

Post: #3
RE: Str class -> help needed... (encryption)
Ah, I thought there was something like that in it already.
Thanks.
08-25-2021 12:12 PM
Find all posts by this user Quote this message in a reply
Post Reply