diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-02-23 22:03:09 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-02-25 07:50:25 -0600 |
commit | 8aad028501ef434071d3969bce41c4e6375b4c61 (patch) | |
tree | a06d8e93e8ff50d2e419f6524a8495a644e5f4a6 /docs | |
parent | 4d236049529bc1ab1b301756a6c9be7a30ce8f8a (diff) | |
download | cryptography-8aad028501ef434071d3969bce41c4e6375b4c61.tar.gz cryptography-8aad028501ef434071d3969bce41c4e6375b4c61.tar.bz2 cryptography-8aad028501ef434071d3969bce41c4e6375b4c61.zip |
rename dump to as_bytes
Diffstat (limited to 'docs')
-rw-r--r-- | docs/hazmat/primitives/asymmetric/rsa.rst | 10 | ||||
-rw-r--r-- | docs/hazmat/primitives/asymmetric/serialization.rst | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst index ac58b9d2..80d48497 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 previously loaded or generated key that has the :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization` interface you can use -:meth:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.dump` +:meth:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.as_bytes` to serialize the key. .. doctest:: >>> from cryptography.hazmat.primitives import serialization - >>> pem = private_key.dump( + >>> pem = private_key.as_bytes( ... encoding=serialization.Encoding.PEM, ... fmt=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.dump( + >>> pem = private_key.as_bytes( ... encoding=serialization.Encoding.PEM, ... fmt=serialization.Format.TraditionalOpenSSL, ... encryption_algorithm=serialization.NoEncryption() @@ -534,9 +534,9 @@ Key interfaces :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` instance. - .. method:: dump(encoding, fmt, encryption_algorithm) + .. method:: as_bytes(encoding, fmt, encryption_algorithm) - Dump the key to PEM encoded bytes using the serializer provided. + Serialize the key to bytes. :param encoding: A value from the :class:`~cryptography.hazmat.primitives.serialization.Encoding` enum. diff --git a/docs/hazmat/primitives/asymmetric/serialization.rst b/docs/hazmat/primitives/asymmetric/serialization.rst index b429766d..abf036ac 100644 --- a/docs/hazmat/primitives/asymmetric/serialization.rst +++ b/docs/hazmat/primitives/asymmetric/serialization.rst @@ -323,7 +323,7 @@ Serialization Encryption Types Objects with this interface are usable as encryption types with methods like - :meth:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.dump`. + :meth:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.as_bytes`. All other classes in this section represent the available choices for encryption and have this interface. |