string s = "E4BDA0E5A5BD";
byte[] bs = new byte[s.Length / 2];
int j = 0;
for (int i = 0; i < s.Length; i+=2)
{
string str = s.Substring(i, 2);
bs[j] = (byte)int.Parse(str, System.Globalization.NumberStyles.HexNumber);
j++;
}
s = Encoding.UTF8.GetString(bs); |