code: public static String hexEncode(final String data) {
          try {
              val result = Hex.encodeHex(data.getBytes(StandardCharsets.UTF_8));
              return new String(result);
          } catch (final Exception e) {
              return null;
          }
      }
docs: Hex encode string.
  
  @param data the data
  @return the string