public static String getHash(String algorithm, InputStream in) throws IOException {
		MessageDigest messageDigest = getMessageDigest(algorithm);
		byte[] buf = new byte[16 * 1024];
		int cnt;
		while ((cnt = in.read(buf)) >= 0) {
			messageDigest.update(buf, 0, cnt);
		}
		return NumericUtilities.convertBytesToString(messageDigest.digest());
	}
Generate message digest hash for specified input stream.  Stream will be read
until EOF is reached.
@param algorithm message digest algorithm
@param in input stream
@return message digest hash
@throws IOException if reading input stream produces an error
@throws IllegalArgumentException if specified algorithm is not supported
@see MessageDigest for supported hash algorithms
Ghidra/Framework/FileSystem/src/main/java/ghidra/util/HashUtilities.java