get_hashes

get_hashes(path: str | Path, names: Iterable[str], *, chunk_size: int | None = None) Mapping[str, Hash][source]

Calculate several hexdigests of hash algorithms for a file concurrently.

Parameters:
  • path – The file path.

  • names – Names of the hash algorithms in hashlib

  • chunk_size – The chunk size for reading the file.

Returns:

A collection of observed hexdigests