aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorAlexander Gaynor <alex.gaynor@gmail.com>2014-07-19 10:58:50 -0700
committerAlexander Gaynor <alex.gaynor@gmail.com>2014-07-19 10:58:50 -0700
commite0e9541322cd9186d62f0d807efd77b3467b3ad3 (patch)
treebb2fe36c2a44e025fde30900a5efc997f91cdc7f /docs/hazmat
parent51a05d665ebc7d11fadb739923dbbfee9bc587cc (diff)
downloadcryptography-e0e9541322cd9186d62f0d807efd77b3467b3ad3.tar.gz
cryptography-e0e9541322cd9186d62f0d807efd77b3467b3ad3.tar.bz2
cryptography-e0e9541322cd9186d62f0d807efd77b3467b3ad3.zip
Document the new interface
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/backends/interfaces.rst21
1 files changed, 19 insertions, 2 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 63f84067..42dba723 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -578,6 +578,23 @@ A specific ``backend`` may provide one or more of these interfaces.
:class:`~cryptography.hazmat.primitives.interfaces.EllipticCurvePublicKey`
provider.
+.. class:: PEMSerializationBackend
+
+ .. versionadded:: 0.6
+
+ A backend with methods for working with any PEM encoded keys.
+
+ .. method:: load_pem_private_key(data, password)
+
+ :param bytes data: PEM data to load.
+ :param bytes password: The password to use if the data is encrypted.
+ Should be ``None`` is the data is not encrypted.
+ :return: A new instance of the appropriate type of private key that the
+ serialized data contains.
+ :raises ValueError: If the data could not be deserialized.
+ :raises cryptography.exceptions.UnsupportedAlgorithm: If the data is
+ encrypted with an unsupported algorithm.
+
.. class:: TraditionalOpenSSLSerializationBackend
.. versionadded:: 0.3
@@ -592,8 +609,8 @@ A specific ``backend`` may provide one or more of these interfaces.
:param bytes password: The password to use if this data is encrypted.
Should be None if the data is not encrypted.
- :return: A new instance of the appropriate private key or public key
- that the serialized data contains.
+ :return: A new instance of the appropriate type of private key that the
+ serialized data contains.
:raises ValueError: If the data could not be deserialized correctly.