Menu

#3 sha256: interface suggestion

open
nobody
5
2003-11-04
2003-11-04
No

sha256's interface is a bit different from e.g.
that of md5.

I suggest that the __init__.py installed in
the sha256 directory
contain the following line:

from sha256.sha256 import sha256 as new

Then one can just write:
import sha256
digest = sha256.new('foo bar')

which is in line with how one would use e.g. the
md5 module.

Discussion


Log in to post a comment.