gnulib-tool-py
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnulib-tool-py] Calculating md5sum


From: Dmitriy Selyutin
Subject: [gnulib-tool-py] Calculating md5sum
Date: Fri, 29 Jun 2012 06:37:49 +0400

Hi Bruno,

today I've investigated the code and found that there are some places where we need to use md5sum. There is hashlib.md5 algorithm in Python, but it returns different value than Linux md5sum utility.

Python:
>>> hashlib.md5(b'FILENAME').hexdigest()
'496475a066afb2d2e50a4133b9822497'

Linux:
$ echo FILENAME | md5sum
f2320a63dfa06e5586a86d44fe8e12eb

Is it necessary how bad names are represented? It seems that Python and md5sum conflicts here, so we might have so call md5sum using subprocess. I'd rather prefer to use Python's md5, because calling subprocess is much slower.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]