docs: public static byte[] getFileDigest(InputStream inputStream) throws IOException
    {
      if(!(inputStream instanceof BufferedInputStream)) {
        inputStream = new BufferedInputStream(inputStream);
      }
  
      MessageDigest messageDigest = null;
      try {
        byte[] buffer = new byte[1024];
        messageDigest = MessageDigest.getInstance("MD5");
        for(;;) {
          int bytesRead = inputStream.read(buffer);
          if(bytesRead <= 0) {
            break;
          }
          messageDigest.update(buffer, 0, bytesRead);
        }
      }
      catch(NoSuchAlgorithmException e) {
        throw new BugError("JVM with missing MD5 algorithm for message digest.");
      }
      finally {
        inputStream.close();
      }
  
      return messageDigest.digest();
    }