Added XOR encryption/decryption