Skip to content

Commit bc3261b

Browse files
committed
use sha-256 for downloaded rome binary checksum
1 parent 20729b8 commit bc3261b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/src/main/java/com/diffplug/spotless/rome/RomeExecutableDownloader.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ final class RomeExecutableDownloader {
4747
/**
4848
* The checksum algorithm to use for checking the integrity of downloaded files.
4949
*/
50-
private static final String CHECKSUM_ALGORITHM = "MD5";
50+
private static final String CHECKSUM_ALGORITHM = "SHA256";
5151

5252
/**
5353
* The pattern for {@link String#format(String, Object...) String.format()} for
@@ -229,7 +229,7 @@ private boolean checkFileWithChecksum(Path filePath) {
229229
*
230230
* @param file File to process.
231231
* @param algorithm The checksum algorithm to use.
232-
* @return The MD5 checksum of the given file.
232+
* @return The checksum of the given file.
233233
* @throws IOException When the file does not exist or could not be read.
234234
*/
235235
private String computeChecksum(Path file, String algorithm) throws IOException {
@@ -276,7 +276,7 @@ private Path getChecksumPath(Path file) {
276276
var parent = file.getParent();
277277
var base = parent != null ? parent : file;
278278
var fileName = file.getFileName();
279-
var checksumName = fileName != null ? fileName.toString() + ".md5" : "checksum.md5";
279+
var checksumName = fileName != null ? fileName.toString() + ".sha256" : "checksum.sha256";
280280
return base.resolve(checksumName);
281281
}
282282

0 commit comments

Comments
 (0)