From a9b86905bfc3207aeed99c34ff2d49b5541983c9 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 24 May 2017 15:01:14 -0700 Subject: Put the exchange method on the correct interface (#3591) * Put the exchange method on the correct interface * fixed links in docs --- src/cryptography/hazmat/primitives/asymmetric/dh.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/cryptography/hazmat/primitives/asymmetric/dh.py b/src/cryptography/hazmat/primitives/asymmetric/dh.py index aa60a2d8..d5e82606 100644 --- a/src/cryptography/hazmat/primitives/asymmetric/dh.py +++ b/src/cryptography/hazmat/primitives/asymmetric/dh.py @@ -153,6 +153,13 @@ class DHPrivateKey(object): The DHParameters object associated with this private key. """ + @abc.abstractmethod + def exchange(self, peer_public_key): + """ + Given peer's DHPublicKey, carry out the key exchange and + return shared key as bytes. + """ + @six.add_metaclass(abc.ABCMeta) class DHPrivateKeyWithSerialization(DHPrivateKey): @@ -162,13 +169,6 @@ class DHPrivateKeyWithSerialization(DHPrivateKey): Returns a DHPrivateNumbers. """ - @abc.abstractmethod - def exchange(self, peer_public_key): - """ - Given peer's DHPublicKey, carry out the key exchange and - return shared key as bytes. - """ - @six.add_metaclass(abc.ABCMeta) class DHPublicKey(object): -- cgit v1.2.3