diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2017-05-24 15:01:14 -0700 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-05-24 15:01:14 -0700 |
commit | a9b86905bfc3207aeed99c34ff2d49b5541983c9 (patch) | |
tree | 298c1c75fd15d28d3b9405127c0981c777d3df2c /src | |
parent | bf7b8de3372ad4515bd84596c77b0674f1c4ade3 (diff) | |
download | cryptography-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 'src')
-rw-r--r-- | src/cryptography/hazmat/primitives/asymmetric/dh.py | 14 |
1 files changed, 7 insertions, 7 deletions
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): |