JAL-3631 shorter digest string for the unique user app dir
authorJim Procter <jprocter@dundee.ac.uk>
Fri, 12 Jul 2024 16:38:59 +0000 (17:38 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Fri, 12 Jul 2024 16:38:59 +0000 (17:38 +0100)
getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java

index 8c73262..a43b1dd 100644 (file)
@@ -348,7 +348,8 @@ public final class EnvConfig {
     
     public static final String getFullPathToDirectoryHash(String install_app_dir)
     {
-      MessageDigest md = Digest.getMessageDigest(Digest.VERSION);
+      //sha1 is good enough we hope - paths are short
+      MessageDigest md = Digest.getMessageDigest(1);
       byte[] contents = install_app_dir.getBytes(UTF_8);
       String hash = StringUtil.hexlate(md.digest(contents));
       return hash;