Added function to encode plaintext using repeating key XOR