code: public static String toHex(byte[] b) {
          char[] buf = new char[b.length * 2];
          int j = 0;
          int k;
  
          for (byte aB : b) {
              k = aB;
              buf[j++] = HEX[(k >>> 4) & 0x0F];
              buf[j++] = HEX[k & 0x0F];
          }
          return new String(buf);
      }
docs: Return a hexadecimal representation of a byte array
  
  @param b a byte array
  @return String containing the hexadecimal representation