shippinglabel.checksum
Utilities for creating and checking file sha256 checksums.
New in version 0.6.0.
Functions:
|
Returns the SHA256 hash object for the given file. |
|
Returns whether the SHA256 hash for the file matches |
|
Returns the md5 hash object for the given file. |
|
Constructs a PEP 376 |
-
get_sha256_hash
(filename, blocksize=1048576)[source] Returns the SHA256 hash object for the given file.
New in version 0.6.0.
- Parameters
- Return type
Changed in version 0.16.0: Added support for already open file objects.
-
check_sha256_hash
(filename, hash, blocksize=1048576)[source] Returns whether the SHA256 hash for the file matches
hash
.New in version 0.6.0.
- Parameters
- Return type
Changed in version 0.16.0: Added support for already open file objects.
-
get_md5_hash
(filename, blocksize=1048576)[source] Returns the md5 hash object for the given file.
New in version 0.15.0.
- Parameters
- Return type
Changed in version 0.16.0: Added support for already open file objects.