2.1.22.8.5. cli.helpers.misc.get_sha256_file_hash

cli.helpers.misc.get_sha256_file_hash(file_path: Path, buffer_size: int = 65536, file_hash: hashlib._Hash | None = None) hashlib._Hash

Calculate the SHA256 hash of a file.

Parameters:
  • file_path – Path to the file to hash.

  • buffer_size – Buffer size for reading the file.

  • file_hash – Hash object to update (optional).

Returns:

SHA256 hash object after processing the file.