R
Russell Mangel
I need to convert the following Byte Array, the bytes are are encoded as
ASCII.
Byte[] asciiBytes =
{0x30,0x31,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
0x35,0x31,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x39,0x42,0x31,0x31,0x38,0x31,0
x35,0x34,0x36,0x30,0x32,0x31,0x35,0x39,0x37,0x31,0x34,0x46,0x36,0x35,0x41,0x
42,0x32,0x45,0x45,0x44,0x30,0x33,0x30,0x30,0x30,0x30};
To This Byte Array
Byte[] bytes =
{0x01,0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x15,0x00,0x00,0x00,0x9B,0x11,0x81,
0x54,0x60,0x21,0x59,0x71,0x4F,0x65,0xAB,0x2E,0xED,0x03,0x00,0x00};
I have to convert 0x30 and 0x31 to 0x01, then 0x30 and 0x35 to 0x5, and so
on.
How would I go about doing this?
Thanks
Russell Mangel
Las Vegas, NV
ASCII.
Byte[] asciiBytes =
{0x30,0x31,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
0x35,0x31,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x39,0x42,0x31,0x31,0x38,0x31,0
x35,0x34,0x36,0x30,0x32,0x31,0x35,0x39,0x37,0x31,0x34,0x46,0x36,0x35,0x41,0x
42,0x32,0x45,0x45,0x44,0x30,0x33,0x30,0x30,0x30,0x30};
To This Byte Array
Byte[] bytes =
{0x01,0x05,0x00,0x00,0x00,0x00,0x00,0x05,0x15,0x00,0x00,0x00,0x9B,0x11,0x81,
0x54,0x60,0x21,0x59,0x71,0x4F,0x65,0xAB,0x2E,0xED,0x03,0x00,0x00};
I have to convert 0x30 and 0x31 to 0x01, then 0x30 and 0x35 to 0x5, and so
on.
How would I go about doing this?
Thanks
Russell Mangel
Las Vegas, NV