using System.Globalization;
public static void Main()
byte[] buffer = ConvertHexadecimalStringToByteArray("92D591D29EE5ADF2BD81C388D299F94E");
for (int index = 0; index < buffer.Length; index++)
Console.WriteLine(bl.ToString("X2"));
public static byte[] ConvertHexadecimalStringToByteArray(string hexadecimalString)
if (hexadecimalString.Length % 2 != 0)
throw new ArgumentException(String.Format(CultureInfo.InvariantCulture, "HexaDecimal cannot have an odd number of digits: {0}", hexadecimalString));
byte[] hexByteArray = new byte[hexadecimalString.Length / 2];
for (int index = 0; index < hexByteArray.Length; index++)
string byteValue = hexadecimalString.Substring(index * 2, 2);
hexByteArray[index] = byte.Parse(byteValue, NumberStyles.HexNumber, CultureInfo.InvariantCulture);