[PYTHON-CRYPTO] Comments on PEP 247 (Hashing)
Itamar S.-T.
itamarst at YAHOO.COM
Tue Sep 25 13:41:15 CEST 2001
--- Rich Salz <rsalz at ZOLERA.COM> wrote:
> 1. Why is there a new method; why isn't the classic
> constructor
> good enough? The PEP needs to justify this.
That way you don't have to worry about what the
constructor is called.
> 2. I'm concerned that the new([key],[string])
> calling sequence
> makes ambiguity possible, mistaking a string for
> a key if
> not realizing I'm using HMAC, e.g. I suggest
> removing the initial
> string.
Maybe instead:
new(str="")
new(key, str="")
Having the initial string is useful:
digest = sha.new(str).digest()
=====
Itamar Shtull-Trauring, itamar(at)shtull-trauring.org
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
More information about the python-crypto
mailing list