Since things didn't work out between me and mbedtls, here are the basic encryption algorithms.
Embed:
(wiki syntax)
Show/hide line numbers
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 }
Generated on Thu Jul 21 2022 11:53:31 by 1.7.2