Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ee4be0 commit 343cbd0Copy full SHA for 343cbd0
1 file changed
Tools/scripts/md5sum.py
@@ -2,16 +2,13 @@
2
3
"""Python utility to print MD5 checksums of argument files.
4
5
-Works with Python 1.5.2 and later.
+Works with Python 2.1 and later.
6
"""
7
8
import sys, md5
9
10
BLOCKSIZE = 1024*1024
11
12
-def hexify(s):
13
- return ("%02x"*len(s)) % tuple(map(ord, s))
14
-
15
def main():
16
args = sys.argv[1:]
17
if not args:
@@ -26,7 +23,7 @@ def main():
26
23
break
27
24
sum.update(block)
28
25
f.close()
29
- print hexify(sum.digest()), file
+ print sum.hexdigest(), file
30
31
if __name__ == "__main__":
32
main()
0 commit comments