[#184]: verbs joined to keywords

Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
anastasia prasolova 2022-06-06 16:47:13 +03:00 committed by Anastasia Prasolova
parent d696a8ee68
commit e086d0d62b
8 changed files with 211 additions and 224 deletions

View file

@ -44,11 +44,9 @@ def get_file_hash(filename: str):
Returns:
(str): the hash of the file
"""
blocksize = 65536
file_hash = hashlib.md5()
file_hash = hashlib.sha256()
with open(filename, "rb") as out:
for block in iter(lambda: out.read(blocksize), b""):
file_hash.update(block)
file_hash.update(out.read())
return file_hash.hexdigest()