public static String hash(String content) throws IOException { synchronized (DIGEST) { DIGEST.reset(); DIGEST.update(content.getBytes(StandardCharsets.UTF_8)); return bytesToHexString(DIGEST.digest()); } }
public static String hashFile(Path path) throws IOException { synchronized (DIGEST) { DIGEST.reset(); updateDigest(DIGEST, path); return bytesToHexString(DIGEST.digest()); } }
writer.write(HashUtils.bytesToHexString(child.getHash())); writer.newLine(); } else {