Repeating-key XOR function.