code: private static String computeFileHash(File file, MessageDigest md) throws IOException {
          md.reset();
          return BaseEncoding.base16().encode(md.digest(Files.toByteArray(file)));
      }
docs: Computes a hash of the given file's contents using the provided MessageDigest.
  
  @param file the file.
  @param md the message digest.
  @return the hash of the file contents.
  @throws IOException if the file contents cannot be read.