code: def HashFile(self, fd, byte_count):
      
      while byte_count > 0:
        buf_size = min(byte_count, constants.CLIENT_MAX_BUFFER_SIZE)
        buf = fd.read(buf_size)
        if not buf:
          break
  
        self.HashBuffer(buf)
        byte_count -= buf_size
docs: Updates underlying hashers with a given file.
  
      Args:
        fd: A file object that is going to be fed to the hashers.
        byte_count: A maximum number of bytes that are going to be processed.