aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography/hazmat/primitives/hmac.py
diff options
context:
space:
mode:
Diffstat (limited to 'cryptography/hazmat/primitives/hmac.py')
-rw-r--r--cryptography/hazmat/primitives/hmac.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/cryptography/hazmat/primitives/hmac.py b/cryptography/hazmat/primitives/hmac.py
index 08dfae01..2bd8e4d3 100644
--- a/cryptography/hazmat/primitives/hmac.py
+++ b/cryptography/hazmat/primitives/hmac.py
@@ -22,15 +22,11 @@ from cryptography.hazmat.primitives import interfaces
@utils.register_interface(interfaces.HashContext)
class HMAC(object):
- def __init__(self, key, algorithm, ctx=None, backend=None):
+ def __init__(self, key, algorithm, backend, ctx=None):
if not isinstance(algorithm, interfaces.HashAlgorithm):
raise TypeError("Expected instance of interfaces.HashAlgorithm.")
self.algorithm = algorithm
- if backend is None:
- from cryptography.hazmat.bindings import _default_backend
- backend = _default_backend
-
self._backend = backend
self._key = key
if ctx is None:
@@ -51,7 +47,7 @@ class HMAC(object):
return HMAC(
self._key,
self.algorithm,
- backend=self._backend,
+ self._backend,
ctx=self._ctx.copy()
)