Skip to content

Commit f290e4e

Browse files
rvoddensybrenstuvel
authored andcommitted
Correct return value of verify()
1 parent 3450f43 commit f290e4e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/usage.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,12 @@ function and then use the :py:func:`rsa.sign_hash` function to sign the hash:
187187
>>> signature = rsa.sign_hash(hash, privkey, 'SHA-1')
188188

189189
In order to verify the signature, use the :py:func:`rsa.verify`
190-
function. This function returns True if the verification is successful:
190+
function. This function returns the name of the hash used. If the verification
191+
is no successful a
191192

192193
>>> message = 'Go left at the blue tree'.encode()
193194
>>> rsa.verify(message, signature, pubkey)
194-
True
195+
'SHA-1'
195196

196197
Modify the message, and the signature is no longer valid and a
197198
:py:class:`rsa.pkcs1.VerificationError` is thrown:

0 commit comments

Comments
 (0)