code: def update_hash(cls, filelike, digest):
      
      block_size = digest.block_size * 1024
      for chunk in iter(lambda: filelike.read(block_size), b''):
        digest.update(chunk)
docs: Update the digest of a single file in a memory-efficient manner.