repeating-key XOR Cipher function and test