summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2021-01-31 10:37:26 -0600
committerGitHub <noreply@github.com>2021-01-31 11:37:26 -0500
commit6a8c0b55b99f95e1fcc8bb9c2b03fd9158d2081e (patch)
treed36ca50f0771078033e93f2ae2fc881b94ef930b /docs
parentf5940f068de1c07641cd102826e476531574d435 (diff)
downloadcryptography-6a8c0b55b99f95e1fcc8bb9c2b03fd9158d2081e.tar.gz
make PrivateKeyWithSerialization an alias of PrivateKey (#5722)
* make PrivateKeyWithSerialization an alias of PrivateKey * black
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/primitives/asymmetric/dh.rst19
-rw-r--r--docs/hazmat/primitives/asymmetric/dsa.rst20
-rw-r--r--docs/hazmat/primitives/asymmetric/ec.rst16
-rw-r--r--docs/hazmat/primitives/asymmetric/rsa.rst26
-rw-r--r--docs/hazmat/primitives/asymmetric/serialization.rst11
5 files changed, 37 insertions, 55 deletions
diff --git a/docs/hazmat/primitives/asymmetric/dh.rst b/docs/hazmat/primitives/asymmetric/dh.rst
index 6b47da089..3b8b58bae 100644
--- a/docs/hazmat/primitives/asymmetric/dh.rst
+++ b/docs/hazmat/primitives/asymmetric/dh.rst
@@ -195,9 +195,6 @@ Key interfaces
.. versionadded:: 1.7
- A DH private key that is not an :term:`opaque key` also implements
- :class:`DHPrivateKeyWithSerialization` to provide serialization methods.
-
.. attribute:: key_size
The bit length of the prime modulus.
@@ -223,15 +220,6 @@ Key interfaces
:return bytes: The agreed key. The bytes are ordered in 'big' endian.
-
-.. class:: DHPrivateKeyWithSerialization
-
- .. versionadded:: 1.7
-
- This interface contains additional methods relating to serialization.
- Any object with this interface also has all the methods from
- :class:`DHPrivateKey`.
-
.. method:: private_numbers()
Return the numbers that make up this private key.
@@ -266,6 +254,13 @@ Key interfaces
:return bytes: Serialized key.
+.. class:: DHPrivateKeyWithSerialization
+
+ .. versionadded:: 1.7
+
+ Alias for :class:`DHPrivateKey`.
+
+
.. class:: DHPublicKey
.. versionadded:: 1.7
diff --git a/docs/hazmat/primitives/asymmetric/dsa.rst b/docs/hazmat/primitives/asymmetric/dsa.rst
index 788e4270b..b151b0ef4 100644
--- a/docs/hazmat/primitives/asymmetric/dsa.rst
+++ b/docs/hazmat/primitives/asymmetric/dsa.rst
@@ -289,9 +289,7 @@ Key interfaces
.. versionadded:: 0.3
- A `DSA`_ private key. A DSA private key that is not an
- :term:`opaque key` also implements :class:`DSAPrivateKeyWithSerialization`
- to provide serialization methods.
+ A `DSA`_ private key.
.. method:: public_key()
@@ -330,15 +328,6 @@ Key interfaces
:return bytes: Signature.
-
-.. class:: DSAPrivateKeyWithSerialization
-
- .. versionadded:: 0.8
-
- This interface contains additional methods relating to serialization.
- Any object with this interface also has all the methods from
- :class:`DSAPrivateKey`.
-
.. method:: private_numbers()
Create a
@@ -378,6 +367,13 @@ Key interfaces
:return bytes: Serialized key.
+.. class:: DSAPrivateKeyWithSerialization
+
+ .. versionadded:: 0.8
+
+ Alias for :class:`DSAPrivateKey`.
+
+
.. class:: DSAPublicKey
.. versionadded:: 0.3
diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst
index 5691560f3..c45cc9ad7 100644
--- a/docs/hazmat/primitives/asymmetric/ec.rst
+++ b/docs/hazmat/primitives/asymmetric/ec.rst
@@ -627,15 +627,6 @@ Key Interfaces
Size (in :term:`bits`) of a secret scalar for the curve (as generated
by :func:`generate_private_key`).
-
-.. class:: EllipticCurvePrivateKeyWithSerialization
-
- .. versionadded:: 0.8
-
- This interface contains additional methods relating to serialization.
- Any object with this interface also has all the methods from
- :class:`EllipticCurvePrivateKey`.
-
.. method:: private_numbers()
Create a :class:`EllipticCurvePrivateNumbers` object.
@@ -670,6 +661,13 @@ Key Interfaces
:return bytes: Serialized key.
+.. class:: EllipticCurvePrivateKeyWithSerialization
+
+ .. versionadded:: 0.8
+
+ Alias for :class:`EllipticCurvePrivateKey`.
+
+
.. class:: EllipticCurvePublicKey
.. versionadded:: 0.5
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index be69c636c..7a3e835a1 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -85,10 +85,8 @@ There is also support for :func:`loading public keys in the SSH format
Key serialization
~~~~~~~~~~~~~~~~~
-If you have a private 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.private_bytes`
+If you have a private key that you've loaded you can use
+:meth:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey.private_bytes`
to serialize the key.
.. doctest::
@@ -536,9 +534,7 @@ Key interfaces
.. versionadded:: 0.2
- An `RSA`_ private key. An RSA private key that is not an
- :term:`opaque key` also implements :class:`RSAPrivateKeyWithSerialization`
- to provide serialization methods.
+ An `RSA`_ private key.
.. method:: decrypt(ciphertext, padding)
@@ -587,15 +583,6 @@ Key interfaces
:return bytes: Signature.
-
-.. class:: RSAPrivateKeyWithSerialization
-
- .. versionadded:: 0.8
-
- This interface contains additional methods relating to serialization.
- Any object with this interface also has all the methods from
- :class:`RSAPrivateKey`.
-
.. method:: private_numbers()
Create a
@@ -635,6 +622,13 @@ Key interfaces
:return bytes: Serialized key.
+.. class:: RSAPrivateKeyWithSerialization
+
+ .. versionadded:: 0.8
+
+ Alias for :class:`RSAPrivateKey`.
+
+
.. class:: RSAPublicKey
.. versionadded:: 0.2
diff --git a/docs/hazmat/primitives/asymmetric/serialization.rst b/docs/hazmat/primitives/asymmetric/serialization.rst
index 2324340e1..07a7456e4 100644
--- a/docs/hazmat/primitives/asymmetric/serialization.rst
+++ b/docs/hazmat/primitives/asymmetric/serialization.rst
@@ -924,15 +924,14 @@ Serialization Encryption Types
Objects with this interface are usable as encryption types with methods
like ``private_bytes`` available on
- :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization`
+ :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey`
,
- :class:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKeyWithSerialization`
- , :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKeyWithSerialization`
+ :class:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKey`
+ , :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKey`
and
- :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKeyWithSerialization`.
+ :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey`.
All other classes in this section represent the available choices for
- encryption and have this interface. They are used with
- :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKeyWithSerialization.private_bytes`.
+ encryption and have this interface.
.. class:: BestAvailableEncryption(password)