code: public static String byteToHex(byte[] array, String separator) {
          assert array != null;
          StringBuilder buffer = new StringBuilder();
          for (int i = 0; i < array.length; i++) {
              // add separator in between, not before the first byte
              if (i != 0) {
                  buffer.append(separator);
              }
              // (b & 0xff) treats b as unsigned byte
              // first nibble is 0 if byte is less than 0x10
              if ((array[i] & 0xff) < 0x10) {
                  buffer.append("0");
              }
              // use java's hex conversion for the rest
              buffer.append(Integer.toString(array[i] & 0xff, 16));
          }
          return buffer.toString();
      }
docs: Converts a byte array to a hex string.
  <p>
  Every single byte is shown in the string, also prepended zero bytes.
  Single bytes are delimited with the separator.
  
  @param array
  byte array to convert
  @param separator
  the delimiter of the bytes
  @return hexadecimal string representation of the byte array