浏览代码

Use sha256 for hashing files

dennisro 5 年之前
父节点
当前提交
5b5f81674e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      2.py

+ 1 - 1
2.py

@@ -58,7 +58,7 @@ def joinDicts(dict1, dict2):
 
 def hashfile(path, blocksize = 65536):
     afile = open(path, 'rb')
-    hasher = hashlib.md5()
+    hasher = hashlib.sha256()
     buf = afile.read(blocksize)
     while len(buf) > 0:
         hasher.update(buf)