diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-02-25 23:05:54 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-02-25 23:05:54 -0600 |
commit | a0c157f467536b556481f7c2ee950612f4f8f7e7 (patch) | |
tree | 6c83bf461049a48f4e5ae62198e13f4bf959282f /docs | |
parent | dc720296556645f0641907e3618f6a1613c39fe7 (diff) | |
download | cryptography-a0c157f467536b556481f7c2ee950612f4f8f7e7.tar.gz cryptography-a0c157f467536b556481f7c2ee950612f4f8f7e7.tar.bz2 cryptography-a0c157f467536b556481f7c2ee950612f4f8f7e7.zip |
fix docs, port some review comments forward to the new PR
Diffstat (limited to 'docs')
-rw-r--r-- | docs/hazmat/primitives/asymmetric/rsa.rst | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst index 198ed7a3..b3119440 100644 --- a/docs/hazmat/primitives/asymmetric/rsa.rst +++ b/docs/hazmat/primitives/asymmetric/rsa.rst @@ -115,22 +115,8 @@ RSA .. versionadded:: 0.3 - :param bytes signature: The signature to verify. - - :param padding: An instance of a - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` - provider. - - :param algorithm: An instance of a - :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` - provider. - - :param backend: A - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` - provider. - - :returns: - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerificationContext` + Verify data was signed by the private key associated with the public + key. .. doctest:: @@ -142,15 +128,32 @@ RSA ... key_size=2048, ... backend=default_backend() ... ) - >>> signer = private_key.signer(padding.PKCS1(), hashes.SHA256(), default_backend()) + >>> signer = private_key.signer(padding.PKCS1v15(), hashes.SHA256(), default_backend()) >>> data= b"this is some data I'd like to sign" >>> signer.update(data) >>> signature = signer.finalize() >>> public_key = private_key.public_key() - >>> verifier = public_key.verifier(signature, padding.PKCS1(), hashes.SHA256(), default_backend()) + >>> verifier = public_key.verifier(signature, padding.PKCS1v15(), hashes.SHA256(), default_backend()) >>> verifier.update(data) >>> verifier.verify() + :param bytes signature: The signature to verify. + + :param padding: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` + provider. + + :param algorithm: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` + provider. + + :param backend: A + :class:`~cryptography.hazmat.backends.interfaces.RSABackend` + provider. + + :returns: + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerificationContext` + .. _`RSA`: https://en.wikipedia.org/wiki/RSA_(cryptosystem) .. _`public-key`: https://en.wikipedia.org/wiki/Public-key_cryptography .. _`use 65537`: http://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html |