aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/asymmetric/rsa.rst
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-02-27 17:05:52 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-02-27 17:05:52 -0600
commit6177cbe2fad1422899a2c26cb53abbbf97886485 (patch)
treef748a67d27b9bded4e678f9d5dc4773607c086e0 /docs/hazmat/primitives/asymmetric/rsa.rst
parent858dd3fcb2851b647c2581c8f4246d0d9c7c2be2 (diff)
downloadcryptography-6177cbe2fad1422899a2c26cb53abbbf97886485.tar.gz
cryptography-6177cbe2fad1422899a2c26cb53abbbf97886485.tar.bz2
cryptography-6177cbe2fad1422899a2c26cb53abbbf97886485.zip
address review feedback
Diffstat (limited to 'docs/hazmat/primitives/asymmetric/rsa.rst')
-rw-r--r--docs/hazmat/primitives/asymmetric/rsa.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index 80d48497..17e13c28 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -94,7 +94,7 @@ to serialize the key.
>>> from cryptography.hazmat.primitives import serialization
>>> pem = private_key.as_bytes(
... encoding=serialization.Encoding.PEM,
- ... fmt=serialization.Format.PKCS8,
+ ... format=serialization.Format.PKCS8,
... encryption_algorithm=serialization.BestAvailableEncryption(b'mypassword')
... )
>>> pem.splitlines()[0]
@@ -107,7 +107,7 @@ It is also possible to serialize without encryption using
>>> pem = private_key.as_bytes(
... encoding=serialization.Encoding.PEM,
- ... fmt=serialization.Format.TraditionalOpenSSL,
+ ... format=serialization.Format.TraditionalOpenSSL,
... encryption_algorithm=serialization.NoEncryption()
... )
>>> pem.splitlines()[0]
@@ -534,14 +534,18 @@ Key interfaces
:class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers`
instance.
- .. method:: as_bytes(encoding, fmt, encryption_algorithm)
+ .. method:: as_bytes(encoding, format, encryption_algorithm)
- Serialize the key to bytes.
+ Allows serialization of the key to bytes. Encoding (PEM or DER), format
+ (TraditionalOpenSSL or PKCS8) and encryption algorithm (such as
+ :class:`~cryptography.hazmat.primitives.serialization.BestAvailableEncryption`
+ or :class:`~cryptography.hazmat.primitives.serialization.NoEncryption`)
+ are chosen to define the exact serialization.
:param encoding: A value from the
:class:`~cryptography.hazmat.primitives.serialization.Encoding` enum.
- :param fmt: A value from the
+ :param format: A value from the
:class:`~cryptography.hazmat.primitives.serialization.Format` enum.
:param encryption_algorithm: An instance of an object conforming to the