Since things didn't work out between me and mbedtls, here are the basic encryption algorithms.

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers xor.h Source File

xor.h

00001 #include <iostream>
00002 
00003 string encryptDecrypt(string toEncrypt) {
00004     char key[3] = {'K', 'C', 'Q'}; 
00005     string output = toEncrypt;
00006 
00007     for (int i = 0; i < toEncrypt.size(); i++)
00008         output[i] = toEncrypt[i] ^ key[i % (sizeof(key) / sizeof(char))];
00009 
00010     return output;
00011 }