this.appArgs = appArgs;
}
+ /**
+ * compute a hash for the given path string using the getdown digest
+ * @param install_app_dir
+ * @return 8-character hex hash
+ */
public static final String getFullPathToDirectoryHash(String install_app_dir)
{
- //sha1 is good enough we hope - paths are short
- MessageDigest md = Digest.getMessageDigest(1);
+ MessageDigest md = Digest.getMessageDigest(Digest.VERSION);
byte[] contents = install_app_dir.getBytes(UTF_8);
String hash = StringUtil.hexlate(md.digest(contents));
- return hash;
+ return hash.substring(0,8);
}
protected static final String getUserAppdir() {