summaryrefslogtreecommitdiff
path: root/lib/Crypto/Signature
diff options
context:
space:
mode:
authorDwayne Litzenberger <dlitz@dlitz.net>2013-02-16 16:06:32 -0800
committerDwayne Litzenberger <dlitz@dlitz.net>2013-02-16 16:20:23 -0800
commit755375bb7d866a01e19153f5809772f4474eb94d (patch)
treeb8abee5c8e7c529330cfe371a318075df2a86b28 /lib/Crypto/Signature
parent7f5b9415346ea5849e8f6becbafcef8a48cf1b8f (diff)
downloadpycrypto-755375bb7d866a01e19153f5809772f4474eb94d.tar.gz
Hash: Rename SHA->SHA1 and RIPEMD->RIPEMD160 (1/2)
These algorithm names were confusing, because there are actually algorithms called "SHA" (a.k.a. SHA-0) and "RIPEMD" (the original version). This commit just renames the modules, with no backward-compatibility support.
Diffstat (limited to 'lib/Crypto/Signature')
-rw-r--r--lib/Crypto/Signature/PKCS1_PSS.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Crypto/Signature/PKCS1_PSS.py b/lib/Crypto/Signature/PKCS1_PSS.py
index 7038f4e..cd9eaf3 100644
--- a/lib/Crypto/Signature/PKCS1_PSS.py
+++ b/lib/Crypto/Signature/PKCS1_PSS.py
@@ -30,13 +30,13 @@ For example, a sender may authenticate a message using SHA-1 and PSS like
this:
>>> from Crypto.Signature import PKCS1_PSS
- >>> from Crypto.Hash import SHA
- >>> from Crypto.PublicKey import RSA
+ >>> from Crypto.Hash import SHA1
+ >>> from Crypto.PublicKey import RSA1
>>> from Crypto import Random
>>>
>>> message = 'To be signed'
>>> key = RSA.importKey(open('privkey.der').read())
- >>> h = SHA.new()
+ >>> h = SHA1.new()
>>> h.update(message)
>>> signer = PKCS1_PSS.new(key)
>>> signature = signer.sign(key)
@@ -45,7 +45,7 @@ At the receiver side, verification can be done like using the public part of
the RSA key:
>>> key = RSA.importKey(open('pubkey.der').read())
- >>> h = SHA.new()
+ >>> h = SHA1.new()
>>> h.update(message)
>>> verifier = PKCS1_PSS.new(key)
>>> if verifier.verify(h, signature):