天蓬老师2017-04-17 13:19:51
The meaning above is a number and the same numberXOR twiceThe result is itself:
std::string str3;
for (int i = 0; i < strCount; i++){
str3.append(1,str2[i]^(key[i%keyCount]));
}
This way str3 is the same as str1.
天蓬老师2017-04-17 13:19:51
The decryption process of XOR encryption is to XOR the encrypted string again, that is to say, just treat str3 as str1 and put it in your method.
But it’s really amazing. Your algorithm XORs the strings and the resulting string is still readable, which is amazing.