File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,14 @@ The following example shows how the sender can use its own *private* key
2121At the receiver side, the matching *public * RSA key is used to verify
2222authenticity of the incoming message::
2323
24- >>> key = RSA.import_key(open('pubkey.der').read())
24+ >>> key = RSA.import_key(open('pubkey.der', 'rb' ).read())
2525 >>> h = SHA256.new(message)
2626 >>> verifier = pss.new(key)
2727 >>> try:
2828 >>> verifier.verify(h, signature)
29- >>> print "The signature is authentic."
30- >>> except (ValueError, TypeError ):
31- >>> print "The signature is not authentic."
29+ >>> print( "The signature is authentic.")
30+ >>> except (ValueError):
31+ >>> print( "The signature is not authentic.")
3232
3333.. __ : https://tools.ietf.org/html/rfc8017#section-8.1
3434
You can’t perform that action at this time.
0 commit comments