computeSha256#

lsst.ts.wep.utils.computeSha256(path, chunkSize=1048576)#

Compute the SHA-256 hex digest of a file.

Parameters:
  • path (str) – Path to the file to hash.

  • chunkSize (int, optional) – Number of bytes read per chunk while streaming the file. Default is 1 MiB.

Returns:

The hexadecimal SHA-256 digest of the file contents.

Return type:

str