This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author avalentino
Recipients SilentGhost, avalentino, christian.heimes, gregory.p.smith, martin.panter, palaviv, rhettinger, terry.reedy, vstinner
Date 2016-08-21.16:36:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hi all,
please note that to stay compatible with the GNU md5sum utility you should print the file name prefixed by a "*" if you read the file in binary mode.

Also when digests is checked, files to check should be opened in binary or text mode according the presence/absence of the "*" character before the file name.

A explicit error should be raised IMO if some specific mode is not supported (e.g. text mode) by the check function.

Also, since the tool supports different hashing algorithms the openssl/BSD-style output format could be more appropriate IMO:

MD5 (file01.dat) = 101b455ce70d2e73e1a4d92a3e8c29e1

FYI I wrote a the hashsum package [1] that provides a command line tool that is intended to be a "Python drop-in replacement for md5sum and co.".

If my understanding is correct you want to keep this patch as simple as possible but, if you are interested in, I could provide patches to:

* fix the GNU style output: binary ("*") vs text mode
* implement full support for the text mode
* implement full support for BSD-style output format

I could also convert the utility [1] to be integrated directly in hashlib.

Date User Action Args
2016-08-21 16:36:06avalentinosetrecipients: + avalentino, rhettinger, terry.reedy, gregory.p.smith, vstinner, christian.heimes, SilentGhost, martin.panter, palaviv
2016-08-21 16:36:06avalentinosetmessageid: <>
2016-08-21 16:36:06avalentinolinkissue26488 messages
2016-08-21 16:36:06avalentinocreate