code: public String encodeHex(String hexa) {
          if (!hexa.matches("^[0-9a-fA-F]+$")) {
              return "";
          }
  
          final List<Long> matched = new ArrayList<Long>();
          final Matcher    matcher = PATTERN.matcher(hexa);
  
          while (matcher.find()) {
              matched.add(Long.parseLong("1" + matcher.group(), 16));
          }
  
          // conversion
          final long[] result = new long[matched.size()];
          for (int i = 0; i < matched.size(); i++) {
              result[i] = matched.get(i);
          }
  
          return this.encode(result);
      }
docs: Encrypt hexa to string
  
  @param hexa the hexa to encrypt
  @return the encrypt string