1.                         StringBuilder hex1 = new StringBuilder(length * 2);
  2.                         foreach (byte b in hex)
  3.                             hex1.AppendFormat("{0:x2}", b);
  4.                         textBox2.Text = hex.ToString();