aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography/hazmat/primitives/hmac.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-11-12 14:27:19 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-11-12 14:27:19 -0800
commit73278747b04c3bfca3972d69a917c194db6c24e3 (patch)
treebfa67144c2e7b743afecb24337601005eaa00df8 /cryptography/hazmat/primitives/hmac.py
parent906e195b2ea255d0e8153c25d273c918ea313ce3 (diff)
downloadcryptography-73278747b04c3bfca3972d69a917c194db6c24e3.tar.gz
cryptography-73278747b04c3bfca3972d69a917c194db6c24e3.tar.bz2
cryptography-73278747b04c3bfca3972d69a917c194db6c24e3.zip
Drop random support for weird inheritance
Diffstat (limited to 'cryptography/hazmat/primitives/hmac.py')
-rw-r--r--cryptography/hazmat/primitives/hmac.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/cryptography/hazmat/primitives/hmac.py b/cryptography/hazmat/primitives/hmac.py
index 1457ed78..ed2dd54a 100644
--- a/cryptography/hazmat/primitives/hmac.py
+++ b/cryptography/hazmat/primitives/hmac.py
@@ -21,7 +21,6 @@ from cryptography.hazmat.primitives import interfaces
@interfaces.register(interfaces.HashContext)
class HMAC(object):
def __init__(self, key, algorithm, ctx=None, backend=None):
- super(HMAC, self).__init__()
if not isinstance(algorithm, interfaces.HashAlgorithm):
raise TypeError("Expected instance of interfaces.HashAlgorithm.")
self.algorithm = algorithm
@@ -43,8 +42,12 @@ class HMAC(object):
self._backend.hmacs.update_ctx(self._ctx, msg)
def copy(self):
- return self.__class__(self._key, self.algorithm, backend=self._backend,
- ctx=self._backend.hmacs.copy_ctx(self._ctx))
+ return HMAC(
+ self._key,
+ self.algorithm,
+ backend=self._backend,
+ ctx=self._backend.hmacs.copy_ctx(self._ctx)
+ )
def finalize(self):
return self._backend.hmacs.finalize_ctx(self._ctx,