compute hashsum of local file
This is how i can compute a checksum of a local file that can be compared to the output of slk_helpers checkum
:
def checksum(filename, block_size=1024):
import hashlib
check_hash = hashlib.sha512()
with open(filename,"rb") as f:
for byte_block in iter(lambda: f.read(block_size),b""):
check_hash.update(byte_block)
return check_hash.hexdigest()
Just want to dump that here. This can take quite some time for large files...