aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/asymmetric/serialization.rst
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-09-26 15:43:47 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-09-26 15:43:47 -0500
commit58f63ed781b73478ee3fe60ebe1cfdfd85df5186 (patch)
tree32673233373345e277af0176a46351841e46d0c1 /docs/hazmat/primitives/asymmetric/serialization.rst
parent0520a2512d461b100ce1988ad094f76a219528b5 (diff)
parentebba1b0db3975c81742e8092619133fe2349124e (diff)
downloadcryptography-58f63ed781b73478ee3fe60ebe1cfdfd85df5186.tar.gz
cryptography-58f63ed781b73478ee3fe60ebe1cfdfd85df5186.tar.bz2
cryptography-58f63ed781b73478ee3fe60ebe1cfdfd85df5186.zip
Merge pull request #1331 from michael-hart/public_key_pem
Add support for .PEM public keys, with tests and docs
Diffstat (limited to 'docs/hazmat/primitives/asymmetric/serialization.rst')
-rw-r--r--docs/hazmat/primitives/asymmetric/serialization.rst21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/serialization.rst b/docs/hazmat/primitives/asymmetric/serialization.rst
index 7a953d9b..18b89c44 100644
--- a/docs/hazmat/primitives/asymmetric/serialization.rst
+++ b/docs/hazmat/primitives/asymmetric/serialization.rst
@@ -92,6 +92,27 @@ all begin with ``-----BEGIN {format}-----`` and end with ``-----END
is not supported by the backend or if the key is encrypted with a
symmetric cipher that is not supported by the backend.
+.. function:: load_pem_public_key(data, backend):
+
+ .. versionadded:: 0.6
+
+ Deserialize a public key from PEM encoded data to one of the supported
+ asymmetric public key types.
+
+ :param bytes data: The PEM encoded key data.
+
+ :param backend: A
+ :class:`~cryptography.hazmat.backends.interfaces.PEMSerializationBackend`
+ provider.
+
+ :returns: A new instance of a public key.
+
+ :raises ValueError: If the PEM data could not be decrypted or if its
+ structure could not be decoded successfully.
+
+ :raises UnsupportedAlgorithm: If the serialized key is of a type that
+ is not supported by the backend.
+
PKCS #8 Format
~~~~~~~~~~~~~~