I just did a simple test, and there's something wrong with this code (I'm not sure what it is). XOR ciphers are solvable via (plaintext) XOR (ciphertext), meaning if I encrypt the encrypted text using the same key, I should get the original text.
PHP Code:
function test() {
temp.a = XOREncrypt("test string", true, null);
temp.b = XOREncrypt(temp.a, true, null);
echo(temp.a);
echo(temp.b);
}
Returns:
PHP Code:
5'00e53:-$,
test-strdng
It seems that it's always 1 letter off.
Correct me if I'm wrong.