Skip to content

Commit

Permalink
del md5sum function
Browse files Browse the repository at this point in the history
  • Loading branch information
cococo2000 committed Feb 25, 2024
1 parent 81d9801 commit 442f30e
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/com/olxpbenchmark/util/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,25 +102,6 @@ public static String header(String msg, String marker, int length) {
return String.format("%s %s %s%s", border, msg, border, (add_extra ? marker : ""));
}

/**
* Return the MD5 checksum of the given string
*
* @param input
* @return
*/
public static String md5sum(String input) {
MessageDigest digest = null;
try {
digest = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException ex) {
throw new RuntimeException("Unable to compute md5sum for string", ex);
}
assert (digest != null);
digest.update(input.getBytes());
BigInteger hash = new BigInteger(1, digest.digest());
return (hash.toString(16));
}

/**
* Split the multi-lined strings into separate columns
*
Expand Down

0 comments on commit 442f30e

Please sign in to comment.