xor cipher to encrypt plain data with key