I have a string array
Receivedbyte[0]=5A
Receivedbyte[1]=3A
Receivedbyte[2]=7A
Receivedbyte[3]=60
I want to treat them as hex numbers and xor each of the value by 0x20. so I want my data to be 0x5A ^0x20 in the 0th location. and so on.
I Tried the following , but an error comes which says, input string is not in correct format.
static public string[] escapeFix(string[] Receivedbyte)
{
uint temp = Convert.ToUInt32(Receivedbyte[1]);
temp = temp ^ 0x20;
Receivedbyte[0] = Convert.ToString(temp);
Receivedbyte[1] = Receivedbyte[2];
Receivedbyte[2] = Receivedbyte[3];
return Receivedbyte;
}
Receivedbyte[0]and shuffles all of the rest one place down...