public static String toHex(final byte[] value){StringBuilder retVal = new StringBuilder();retVal.append('[');if (value != null && value.length > 0){for(int x = 0; x < value.length; x++){if (x>0) {retVal.append(", ");}retVal.append(toHex(value[x]));}}retVal.append(']');return retVal.toString();}

public static string ToHex(byte[] value){StringBuilder buffer = new StringBuilder();buffer.Append('[');for (int i = 0; i < value.Length; i++){if (i > 0){buffer.Append(", ");}buffer.Append(ToHex(value[i]));}buffer.Append(']');return buffer.ToString();}
