I do Not know what Xor does.
To clarify what Ziggy said in laymen's terms, imagine you have a number represented in binary:
%10101010
You can XOR that with another 8-bit pattern, for example, %00001111. The zeros mean that the corresponding bits of the number will not be touched. Anywhere there is a zero, will be inverted.
So:
%10101010 XOR %00001111, will become %10100101 (first four bits changed).
%10101010 XOR %00000001, will become %10101011 (only the first bit changed).
%10101010 XOR %11111111, will become %01010101 (all bits changed).
See?
You can use XOR for basic encryption. If you have Chr(97) (lower case 'a'):
97 as binary is %01100001.
Think of any old bit pattern - doesn't matter what. Let's use %00101101.
%01100001 XOR %00101101 = %01001100 = Chr(76) = upper case 'L'.
Performing the same operation on %01001100, with the same bit pattern (%00101101), returns the byte to its original value of 97.