aboutsummaryrefslogtreecommitdiff
path: root/modules/hashes.py
diff options
context:
space:
mode:
authorVladimir Mandic <mandic00@live.com>2023-01-15 09:42:34 -0500
committerGitHub <noreply@github.com>2023-01-15 09:42:34 -0500
commitf0312565e5b4d56a421af889a9a8eaea0ba92959 (patch)
tree17c45f64c843ac1ddf54b95a0c39ea887090d765 /modules/hashes.py
parentebfdd7baeb660ec66f78e1a0e5e45442025f262d (diff)
increase block size
Diffstat (limited to 'modules/hashes.py')
-rw-r--r--modules/hashes.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/hashes.py b/modules/hashes.py
index 14231771..b85a7580 100644
--- a/modules/hashes.py
+++ b/modules/hashes.py
@@ -34,9 +34,10 @@ def cache(subsection):
def calculate_sha256(filename):
hash_sha256 = hashlib.sha256()
+ blksize = 1024 * 1024
with open(filename, "rb") as f:
- for chunk in iter(lambda: f.read(4096), b""):
+ for chunk in iter(lambda: f.read(blksize), b""):
hash_sha256.update(chunk)
return hash_sha256.hexdigest()