public static byte[] StringToByteArray(String hex) { int NumberChars = hex.Length; byte[] bytes = new byte[NumberChars / 2]; for (int j = 0; j < NumberChars; j += 2) bytes[j / 2] = Convert.ToByte(hex.Substring(j, 2), 16); return bytes; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)