///
/// Converts a byte array to a string
///
/// Converts a byte array to a string
///
/// Byte array to be converted
///
private static string byteArrayToString(byte[] arrInput)
{
StringBuilder sb = new StringBuilder(arrInput.Length * 2);
for (int i = 0; i < arrInput.Length; i++)
sb.Append(arrInput[i].
"X2"));
return sb.ToString().ToUpper();
}
private static byte[] StringToByteArray(string textString)
{
UTF8Encoding encoding = new UTF8Encoding();
return encoding.GetBytes(textString);
}
Comments
Post a Comment