aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-02-28 18:54:10 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-02-28 18:54:10 -0600
commit223a8f02a37a87b3c7366441647013cf9a18b061 (patch)
tree35ea59c389d43ff8b23ccf4532932fe80b861660 /docs/hazmat
parent35194c99aeb846b2d85d6303dbe4f11b21eadaa6 (diff)
downloadcryptography-223a8f02a37a87b3c7366441647013cf9a18b061.tar.gz
cryptography-223a8f02a37a87b3c7366441647013cf9a18b061.tar.bz2
cryptography-223a8f02a37a87b3c7366441647013cf9a18b061.zip
change as_bytes to private_bytes, link more things
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/primitives/asymmetric/rsa.rst8
-rw-r--r--docs/hazmat/primitives/asymmetric/serialization.rst11
2 files changed, 11 insertions, 8 deletions
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index adb5cbfc..924696db 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -86,13 +86,13 @@ Key serialization
If you have a key that you've loaded or generated which implements the
:class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization`
interface you can use
-:meth:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.as_bytes`
+:meth:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.private_bytes`
to serialize the key.
.. doctest::
>>> from cryptography.hazmat.primitives import serialization
- >>> pem = private_key.as_bytes(
+ >>> pem = private_key.private_bytes(
... encoding=serialization.Encoding.PEM,
... format=serialization.Format.PKCS8,
... encryption_algorithm=serialization.BestAvailableEncryption(b'mypassword')
@@ -105,7 +105,7 @@ It is also possible to serialize without encryption using
.. doctest::
- >>> pem = private_key.as_bytes(
+ >>> pem = private_key.private_bytes(
... encoding=serialization.Encoding.PEM,
... format=serialization.Format.TraditionalOpenSSL,
... encryption_algorithm=serialization.NoEncryption()
@@ -534,7 +534,7 @@ Key interfaces
:class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers`
instance.
- .. method:: as_bytes(encoding, format, encryption_algorithm)
+ .. method:: private_bytes(encoding, format, encryption_algorithm)
Allows serialization of the key to bytes. Encoding (
:attr:`~cryptography.hazmat.primitives.serialization.Encoding.PEM` or
diff --git a/docs/hazmat/primitives/asymmetric/serialization.rst b/docs/hazmat/primitives/asymmetric/serialization.rst
index 36ba241b..4940ebd4 100644
--- a/docs/hazmat/primitives/asymmetric/serialization.rst
+++ b/docs/hazmat/primitives/asymmetric/serialization.rst
@@ -290,7 +290,8 @@ Serialization Formats
.. versionadded:: 0.8
- An enumeration for key formats.
+ An enumeration for key formats. Used with
+ :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.private_bytes`.
.. attribute:: TraditionalOpenSSL
@@ -310,7 +311,8 @@ Serialization Encodings
.. versionadded:: 0.8
- An enumeration for encoding types.
+ An enumeration for encoding types. Used with
+ :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.private_bytes`.
.. attribute:: PEM
@@ -328,9 +330,10 @@ Serialization Encryption Types
Objects with this interface are usable as encryption types with methods
like
- :meth:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.as_bytes`.
+ :meth:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.private_bytes`.
All other classes in this section represent the available choices for
- encryption and have this interface.
+ encryption and have this interface. They are used with
+ :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.private_bytes`.
.. class:: BestAvailableEncryption(password)