diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-03-27 11:04:21 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-03-27 11:04:21 -0700 |
commit | 3d5d6471b10e5f46eb8b40a9a41eb16e657d25b8 (patch) | |
tree | 8285f420269fd636e63c9152143750922e48e869 /docs/hazmat/primitives/asymmetric | |
parent | 844c14a15884fb60871640576e30a61e6c4c2db1 (diff) | |
parent | 85a791f0fa061ec644f5bfca41ee6038eeef38eb (diff) | |
download | cryptography-3d5d6471b10e5f46eb8b40a9a41eb16e657d25b8.tar.gz cryptography-3d5d6471b10e5f46eb8b40a9a41eb16e657d25b8.tar.bz2 cryptography-3d5d6471b10e5f46eb8b40a9a41eb16e657d25b8.zip |
Merge pull request #849 from public/changeup-exceptions-2-electric-boogaloo
Use a single tagged exception instead of a hierarchy
Diffstat (limited to 'docs/hazmat/primitives/asymmetric')
-rw-r--r-- | docs/hazmat/primitives/asymmetric/rsa.rst | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst index 57c8eec2..182e35d2 100644 --- a/docs/hazmat/primitives/asymmetric/rsa.rst +++ b/docs/hazmat/primitives/asymmetric/rsa.rst @@ -50,7 +50,7 @@ RSA provider. :return: A new instance of ``RSAPrivateKey``. - :raises cryptography.exceptions.UnsupportedInterface: This is raised if + :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if the provided ``backend`` does not implement :class:`~cryptography.hazmat.backends.interfaces.RSABackend` @@ -100,9 +100,16 @@ RSA :returns: :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricSignatureContext` - :raises cryptography.exceptions.UnsupportedInterface: This is raised if + :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if the provided ``backend`` does not implement - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` + :class:`~cryptography.hazmat.backends.interfaces.RSABackend` or if + the backend does not support the chosen hash or padding algorithm. + If the padding is + :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS` + with the + :class:`~cryptography.hazmat.primitives.asymmetric.padding.MGF1` + mask generation function it may also refer to the ``MGF1`` hash + algorithm. :raises TypeError: This is raised when the padding is not an :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` @@ -111,17 +118,6 @@ RSA :raises ValueError: This is raised when the chosen hash algorithm is too large for the key size. - :raises UnsupportedHash: This is raised when the backend does not - support the chosen hash algorithm. If the padding is - :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS` - with the - :class:`~cryptography.hazmat.primitives.asymmetric.padding.MGF1` - mask generation function it may also refer to the `MGF1` hash - algorithm. - - :raises UnsupportedPadding: This is raised when the backend does not - support the chosen padding. - .. class:: RSAPublicKey(public_exponent, modulus) @@ -205,9 +201,16 @@ RSA :returns: :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerificationContext` - :raises cryptography.exceptions.UnsupportedInterface: This is raised if + :raises cryptography.exceptions.UnsupportedAlgorithm: This is raised if the provided ``backend`` does not implement - :class:`~cryptography.hazmat.backends.interfaces.RSABackend` + :class:`~cryptography.hazmat.backends.interfaces.RSABackend` or if + the backend does not support the chosen hash or padding algorithm. + If the padding is + :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS` + with the + :class:`~cryptography.hazmat.primitives.asymmetric.padding.MGF1` + mask generation function it may also refer to the ``MGF1`` hash + algorithm. :raises TypeError: This is raised when the padding is not an :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` @@ -216,16 +219,6 @@ RSA :raises ValueError: This is raised when the chosen hash algorithm is too large for the key size. - :raises UnsupportedHash: This is raised when the backend does not - support the chosen hash algorithm. If the padding is - :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS` - with the - :class:`~cryptography.hazmat.primitives.asymmetric.padding.MGF1` - mask generation function it may also refer to the `MGF1` hash - algorithm. - - :raises UnsupportedPadding: This is raised when the backend does not - support the chosen padding. .. _`RSA`: https://en.wikipedia.org/wiki/RSA_(cryptosystem) .. _`public-key`: https://en.wikipedia.org/wiki/Public-key_cryptography |