aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-29 17:20:10 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-29 17:20:10 -0600
commitef9d65a808d5afef3f7824cf0300aac21e7c698f (patch)
tree2a0f3cb4671820b51df7965211a4d3e576c5fbb3
parente0608db24e4744fd0aeb83a52d173e66989cd54c (diff)
downloadcryptography-ef9d65a808d5afef3f7824cf0300aac21e7c698f.tar.gz
cryptography-ef9d65a808d5afef3f7824cf0300aac21e7c698f.tar.bz2
cryptography-ef9d65a808d5afef3f7824cf0300aac21e7c698f.zip
one more replacement
-rw-r--r--cryptography/hazmat/backends/commoncrypto/backend.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/cryptography/hazmat/backends/commoncrypto/backend.py b/cryptography/hazmat/backends/commoncrypto/backend.py
index b612a805..6a986090 100644
--- a/cryptography/hazmat/backends/commoncrypto/backend.py
+++ b/cryptography/hazmat/backends/commoncrypto/backend.py
@@ -102,11 +102,7 @@ class Backend(object):
return _HMACContext(self, key, algorithm)
def cipher_supported(self, cipher, mode):
- try:
- self._cipher_registry[type(cipher), type(mode)]
- except KeyError:
- return False
- return True
+ return (type(cipher), type(mode)) in self._cipher_registry
def create_symmetric_encryption_ctx(self, cipher, mode):
if isinstance(mode, GCM):