diff options
author | Legrandin <gooksankoo@hoiptorrow.mailexpire.com> | 2011-02-07 22:32:49 +0100 |
---|---|---|
committer | Legrandin <gooksankoo@hoiptorrow.mailexpire.com> | 2011-02-07 22:32:49 +0100 |
commit | 07e9e97e9d1844e5b5427a5e9164ff848eacde19 (patch) | |
tree | 62cd305feffcfc9a058147cc80f7e8b5d1ace149 /lib/Crypto/Random | |
parent | e34af945eac49012be1284b9d948a54c0aabd32e (diff) | |
download | pycrypto-07e9e97e9d1844e5b5427a5e9164ff848eacde19.tar.gz |
Add new() method to all remaining hash algorithms, so as to make them to work with PKCS#1 PSS. Add also test cases for it for every hash.
Diffstat (limited to 'lib/Crypto/Random')
-rw-r--r-- | lib/Crypto/Random/Fortuna/SHAd256.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Crypto/Random/Fortuna/SHAd256.py b/lib/Crypto/Random/Fortuna/SHAd256.py index 288a53e..8b63cb2 100644 --- a/lib/Crypto/Random/Fortuna/SHAd256.py +++ b/lib/Crypto/Random/Fortuna/SHAd256.py @@ -83,6 +83,8 @@ digest_size = _SHAd256.digest_size # PEP 247 module-level "new" function def new(data=""): """Return a new SHAd256 hashing object""" - return _SHAd256(_SHAd256._internal, SHA256.new(data)) + sha = _SHAd256(_SHAd256._internal, SHA256.new(data)) + sha.new = globals()['new'] + return sha # vim:set ts=4 sw=4 sts=4 expandtab: |