private static String computeFileHash ( File file , MessageDigest md ) throws IOException { md . reset ( ) ; return BaseEncoding . base16 ( ) . encode ( md . digest ( Files . toByteArray ( file ) ) ) ; }
Computes a hash of the given file s contents using the provided MessageDigest .