[PYTHON-CRYPTO] Reviving PEP 247: Hashing API
Andrew Kuchling
akuchlin at mems-exchange.org
Mon Sep 17 22:12:55 CEST 2001
On Mon, Sep 17, 2001 at 11:27:14AM -0700, Bram Cohen wrote:
>On Mon, 17 Sep 2001, Andrew Kuchling wrote:
>I rather like how sha.sha maps to the same thing as sha.new, so you can
>say from sha import sha, that could be extended to the other hash
>functions as well.
How come? IMHO it's clearer to always use new() for creating a new
object. md5.md5() or sha.sha() don't make it clear what the return
value would be, at least in my eyes.
>It would also be nice to have a convenience function for new(x).digest()
-0 from me; it only shortens a single line.
--amk
More information about the python-crypto
mailing list