Answers for "byte to hex string"

1

byte to hex string

String.format("%02X", it)
Posted by: Guest on October-05-2021
1

byte array to hex string

public static string ByteArrayToString(byte[] ba)
{
  StringBuilder hex = new StringBuilder(ba.Length * 2);
  foreach (byte b in ba)
    hex.AppendFormat("{0:x2}", b);
  return hex.ToString();
}
Posted by: Guest on August-18-2020

Browse Popular Code Answers by Language