input4mips_validation.hashing#
input4mips_validation.hashing
#
Hashing tools
get_file_hash_sha256(file, buffer_size=2 ** 30)
#
Get a file's sha256 hash
This reads the file in chunks to avoid blowing memory to pieces.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
Path
|
File to hash |
required |
buffer_size
|
int
|
Size of buffer to read. The default is around 1GB. |
2 ** 30
|
Returns:
| Type | Description |
|---|---|
str
|
SHA256 of the file |