aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/asymmetric/dh.rst
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-05-24 15:01:14 -0700
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-05-24 15:01:14 -0700
commita9b86905bfc3207aeed99c34ff2d49b5541983c9 (patch)
tree298c1c75fd15d28d3b9405127c0981c777d3df2c /docs/hazmat/primitives/asymmetric/dh.rst
parentbf7b8de3372ad4515bd84596c77b0674f1c4ade3 (diff)
downloadcryptography-a9b86905bfc3207aeed99c34ff2d49b5541983c9.tar.gz
cryptography-a9b86905bfc3207aeed99c34ff2d49b5541983c9.tar.bz2
cryptography-a9b86905bfc3207aeed99c34ff2d49b5541983c9.zip
Put the exchange method on the correct interface (#3591)
* Put the exchange method on the correct interface * fixed links in docs
Diffstat (limited to 'docs/hazmat/primitives/asymmetric/dh.rst')
-rw-r--r--docs/hazmat/primitives/asymmetric/dh.rst24
1 files changed, 12 insertions, 12 deletions
diff --git a/docs/hazmat/primitives/asymmetric/dh.rst b/docs/hazmat/primitives/asymmetric/dh.rst
index 759b265b..58ff663d 100644
--- a/docs/hazmat/primitives/asymmetric/dh.rst
+++ b/docs/hazmat/primitives/asymmetric/dh.rst
@@ -29,8 +29,7 @@ derivation function.
DHE (or EDH), the ephemeral form of this exchange, is **strongly
preferred** over simple DH and provides `forward secrecy`_ when used.
You must generate a new private key using :func:`~DHParameters.generate_private_key` for
-each :meth:`~DHPrivateKeyWithSerialization.exchange` when performing an DHE key
-exchange.
+each :meth:`~DHPrivateKey.exchange` when performing an DHE key exchange.
To assemble a :class:`~DHParameters` and a :class:`~DHPublicKey` from
primitive integers, you must first create the
@@ -123,12 +122,22 @@ Key interfaces
:return: A :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHParameters`.
+ .. method:: exchange(peer_public_key)
+
+ .. versionadded:: 1.7
+
+ :param DHPublicKeyWithSerialization peer_public_key: The public key for
+ the peer.
+
+ :return bytes: The agreed key. The bytes are ordered in 'big' endian.
+
.. class:: DHPrivateKeyWithSerialization
.. versionadded:: 0.9
- Inherits from :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKey`.
+ Inherits from
+ :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKey`.
.. method:: private_numbers()
@@ -136,15 +145,6 @@ Key interfaces
:return: A :class:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateNumbers`.
- .. method:: exchange(peer_public_key)
-
- .. versionadded:: 1.7
-
- :param DHPublicKeyWithSerialization peer_public_key: The public key for the
- peer.
-
- :return bytes: The agreed key. The bytes are ordered in 'big' endian.
-
.. method:: private_bytes(encoding, format, encryption_algorithm)
.. versionadded:: 1.8