aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/backends
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-05-09 11:09:13 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-05-09 11:11:55 -0500
commitc929e40631c6bfe048e4ed43ca6102d932fa153e (patch)
treee4a49be418d6f1bf1ef61772aa6a522c805348fd /docs/hazmat/backends
parent07287ff1eac2ab5acf6a5f5144704b48da2c820b (diff)
downloadcryptography-c929e40631c6bfe048e4ed43ca6102d932fa153e.tar.gz
cryptography-c929e40631c6bfe048e4ed43ca6102d932fa153e.tar.bz2
cryptography-c929e40631c6bfe048e4ed43ca6102d932fa153e.zip
Improve RSABackend interface docs (fixes #1022)
Diffstat (limited to 'docs/hazmat/backends')
-rw-r--r--docs/hazmat/backends/interfaces.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index f363b541..1e1a6b28 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -275,6 +275,14 @@ A specific ``backend`` may provide one or more of these interfaces.
:class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding`
provider.
+ :return bytes: The decrypted data.
+
+ :raises cryptography.exceptions.UnsupportedAlgorithm: If an unsupported
+ MGF, hash function, or padding is chosen.
+
+ :raises ValueError: When decryption fails or key size does not match
+ ciphertext length.
+
.. method:: encrypt_rsa(public_key, plaintext, padding)
:param public_key: An instance of an
@@ -287,6 +295,12 @@ A specific ``backend`` may provide one or more of these interfaces.
:class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding`
provider.
+ :return bytes: The encrypted data.
+
+ :raises cryptography.exceptions.UnsupportedAlgorithm: If an unsupported
+ MGF, hash function, or padding is chosen.
+
+ :raises ValueError: When plaintext is too long for the key size.
.. class:: TraditionalOpenSSLSerializationBackend