aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-10-03 09:58:45 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-10-03 09:58:45 -0700
commit81a5287984cd31080f7a5a1b249caf626ac8f6bf (patch)
tree9ebbf38b4779b64effec121a6d562c543b613e8b /cryptography
parent548467c8d90a62d7e7647ae7b8d04cc6291d811e (diff)
downloadcryptography-81a5287984cd31080f7a5a1b249caf626ac8f6bf.tar.gz
cryptography-81a5287984cd31080f7a5a1b249caf626ac8f6bf.tar.bz2
cryptography-81a5287984cd31080f7a5a1b249caf626ac8f6bf.zip
Use a None default so composition is easier
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/primitives/block/base.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/cryptography/primitives/block/base.py b/cryptography/primitives/block/base.py
index 197807ea..b84ca9c4 100644
--- a/cryptography/primitives/block/base.py
+++ b/cryptography/primitives/block/base.py
@@ -24,8 +24,12 @@ class _Operation(Enum):
class BlockCipher(object):
- def __init__(self, cipher, mode, api=_default_api):
+ def __init__(self, cipher, mode, api=None):
super(BlockCipher, self).__init__()
+
+ if api is None:
+ api = _default_api
+
self.cipher = cipher
self.mode = mode
self._api = api