Okay one last item. Using:$key = "\x4f\xcb" x (length($msg)/2); how do I handle odd length messages?
We can see in your example too, that the last character is not xored, 0x7a. I would like it to be xored with 0x4f, or the first part of the key.
Thanks for your help.
Aaron
an extra byte or two in the key doesn't hurt anything
It's maybe worth trimming your XORed string to the
original length, or else half of your key pattern might leak... (to
anyone who makes an educated guess about the procedure)
t h i s i s a t e s t m e s s a g e z
74 68 69 73 20 69 73 20 61 20 74 65 73 74 20 6d 65 73 73 61 67 65 7a
4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f c
+b
3b a3 26 b8 6f a2 3c eb 2e eb 3b ae 3c bf 6f a6 2a b8 3c aa 28 ae 35 c
+b
^
+^