Skip to content

Commit

Permalink
Yielded to GitHub security scan nagging (despite limited attack surface)
Browse files Browse the repository at this point in the history
  • Loading branch information
climategadgets committed Jan 19, 2024
1 parent cecf0cd commit 32a068f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,17 @@ protected final void run(C rawConfig) throws IOException {
}

private String getDigest(String source) {
var algorithm = "SHA256";
try {

var md = MessageDigest.getInstance("MD5");
var md = MessageDigest.getInstance(algorithm);
md.update(source.getBytes(UTF_8));
var digest = md.digest();

return HexFormat.of().formatHex(digest);

} catch (NoSuchAlgorithmException ex) {
throw new IllegalStateException("Can't get MD5? Something is seriously wrong", ex);
throw new IllegalStateException("Can't get " + algorithm + "? Something is seriously wrong", ex);
}
}

Expand Down

0 comments on commit 32a068f

Please sign in to comment.