Hi, I need to write an encryption function that's supposed to perform XOR on two characters at a time
The encryption function given is:
crypt(message) = message XOR (K n/2 times) where n is message length
e.g.
message = "abcdefgh"
n = 4
so the encryption would be as follows:
ab cd ef gh
XOR K K K K
---------------
SO how would I do this, any help please!
My professor gave me hint, he said to work with the key K's low-order and hi-order bits as one solution. Feel free if you know a simpler way.