Hi Chip,
Your suggestions thus far have been very helpful and much appreciated. I think I'm close to getting this working.
However, I'm still not getting the expected result. I think maybe it is because the original string is ascii encoded, but uses 2 characters per byte.
For example the entire string is as follows:
022B3330300D0A303030303030360D0A303030342A03
The breakdown is:
02 2B 33 30 30 0D 0A 30 30 30 30 30 30 36 0D 0A 30 30 30 34 2A 03
(STX) (SIGN) (30.0) (SEPARATOR) (00 00 00.6) (SEPARATOR) (000.4) (CHECKSUM) (ETX)
The checksum value is passed to me from an outside provider and I am unable to change the calculation used to calculate it. It is calculated by doing the previously mentioned XOR against the HEX values represented in the ASCII stream, i.e. 33 HEX = 51 ASCII = the number/character 3. So, if I use the Windows calculator I enter 33 XOR 30 XOR 30 XOR 0D XOR 0A etc. When I finish, the result is the same as the checksum value that was passed to me, 2A.
The encoding.ascii method that you suggested appears to be working against one character at a time on the input string, so the result is different.
Again, any ideas/suggestions are most welcome.