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 rhettinger
Recipients SilentGhost, christian.heimes, gregory.p.smith, martin.panter, palaviv, rhettinger, terry.reedy
Date 2016-03-29.15:36:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1459265771.25.0.108644612252.issue26488@psf.upfronthosting.co.za>
In-reply-to
Content
Overall, I'm +1 on the idea and think the patch looks good.  There are two issues to look at:

1) Neither the md5 or shasum command-line tools offer control over the blocksize.  I suggest that option be dropped from the command-line API giving a nice simplification and usability improvement.

The stdin option has issues:

$ md5
abc
0bee89b07a248e27c83fc3d5951213c1

$ python3.6 -m hashlib md5
abc
^D
^CTraceback (most recent call last):
  File "/Users/raymond/cpython/Lib/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/raymond/cpython/Lib/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/raymond/cpython/Lib/hashlib.py", line 246, in <module>
    main()
  File "/Users/raymond/cpython/Lib/hashlib.py", line 238, in main
    data = args.file.read(args.block_size)
KeyboardInterrupt
History
Date User Action Args
2016-03-29 15:36:11rhettingersetrecipients: + rhettinger, terry.reedy, gregory.p.smith, christian.heimes, SilentGhost, martin.panter, palaviv
2016-03-29 15:36:11rhettingersetmessageid: <1459265771.25.0.108644612252.issue26488@psf.upfronthosting.co.za>
2016-03-29 15:36:11rhettingerlinkissue26488 messages
2016-03-29 15:36:10rhettingercreate