pyguymer3.sha256

pyguymer3.sha256(fname, /, *, chunksize=1048576)[source]

Find the SHA-256 hash of a file

This function returns the SHA-256 hash of the passed file.

Parameters:
  • fname (str) – the input file name

  • chunksize (int, optional) – the size of the chunks of any files which are read in (in bytes)

Returns:

hexdigest – The hash hexdigest of the input file.

Return type:

str

Notes

Copyright 2017 Thomas Guymer [1]

References