Example #1
0
 /**
  * Returns an MD5 hash in lower case.
  *
  * @param string string to be hashed
  * @return md5 hash
  */
 public static String md5(final String string) {
   try {
     final MessageDigest md = MessageDigest.getInstance("MD5");
     return string(hex(md.digest(token(string)), false));
   } catch (final Exception ex) {
     throw Util.notExpected(ex);
   }
 }
Example #2
0
  @Override
  public void close() {
    try {
      gui.set(MainOptions.EXPORTER, options(SerialMethod.valueOf(method.getSelectedItem())));
    } catch (final BaseXException ex) {
      throw Util.notExpected(ex);
    }
    if (!ok) return;

    super.close();
    path.store();
  }