aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-12-03 17:34:26 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-12-03 17:34:26 -0600
commit128b948b3cb5840b35ae12613b2215bfe9f098bd (patch)
treea5471c2c8c63f8280c253f77d6d3d730796e9ac9
parent89d19a411edba0cb52da89801e3de1ddfd9f0dc5 (diff)
downloadcryptography-128b948b3cb5840b35ae12613b2215bfe9f098bd.tar.gz
cryptography-128b948b3cb5840b35ae12613b2215bfe9f098bd.tar.bz2
cryptography-128b948b3cb5840b35ae12613b2215bfe9f098bd.zip
remove AEADDecryptionContext per review.
decryption will return AEADCipherContext and encryption returns AEADEncryptionContext
-rw-r--r--cryptography/hazmat/bindings/openssl/backend.py1
-rw-r--r--cryptography/hazmat/primitives/ciphers/base.py7
-rw-r--r--cryptography/hazmat/primitives/interfaces.py4
3 files changed, 1 insertions, 11 deletions
diff --git a/cryptography/hazmat/bindings/openssl/backend.py b/cryptography/hazmat/bindings/openssl/backend.py
index 7d3eb3d7..1b19ddaa 100644
--- a/cryptography/hazmat/bindings/openssl/backend.py
+++ b/cryptography/hazmat/bindings/openssl/backend.py
@@ -240,7 +240,6 @@ class GetCipherByName(object):
@utils.register_interface(interfaces.CipherContext)
@utils.register_interface(interfaces.AEADCipherContext)
@utils.register_interface(interfaces.AEADEncryptionContext)
-@utils.register_interface(interfaces.AEADDecryptionContext)
class _CipherContext(object):
_ENCRYPT = 1
_DECRYPT = 0
diff --git a/cryptography/hazmat/primitives/ciphers/base.py b/cryptography/hazmat/primitives/ciphers/base.py
index cdaf2c0c..b8615cb9 100644
--- a/cryptography/hazmat/primitives/ciphers/base.py
+++ b/cryptography/hazmat/primitives/ciphers/base.py
@@ -46,7 +46,7 @@ class Cipher(object):
if encrypt:
return _AEADEncryptionContext(ctx)
else:
- return _AEADDecryptionContext(ctx)
+ return _AEADCipherContext(ctx)
else:
return _CipherContext(ctx)
@@ -99,11 +99,6 @@ class _AEADCipherContext(object):
self._ctx.authenticate_additional_data(data)
-@utils.register_interface(interfaces.AEADDecryptionContext)
-class _AEADDecryptionContext(_AEADCipherContext):
- pass
-
-
@utils.register_interface(interfaces.AEADEncryptionContext)
class _AEADEncryptionContext(_AEADCipherContext):
@property
diff --git a/cryptography/hazmat/primitives/interfaces.py b/cryptography/hazmat/primitives/interfaces.py
index 582876fe..e3f4f586 100644
--- a/cryptography/hazmat/primitives/interfaces.py
+++ b/cryptography/hazmat/primitives/interfaces.py
@@ -94,10 +94,6 @@ class AEADEncryptionContext(six.with_metaclass(abc.ABCMeta)):
"""
-class AEADDecryptionContext(six.with_metaclass(abc.ABCMeta)):
- pass
-
-
class PaddingContext(six.with_metaclass(abc.ABCMeta)):
@abc.abstractmethod
def update(self, data):