sbool md5OfFile_verbose; static S md5OfFile(S path) { ret md5OfFile(newFile(path)); } static S md5OfFile(File f) ctex { if (!f.exists()) ret "-"; if (md5OfFile_verbose) print("Getting MD5 of " + f); MessageDigest md5 = MessageDigest.getInstance("MD5"); temp FileInputStream in = new FileInputStream(f); byte buf[] = new byte[65536]; int l; while (true) { l = in.read(buf); if (l <= 0) break; md5.update(buf, 0, l); } ret bytesToHex(md5.digest()); }