diff options
author | David Reid <dreid@dreid.org> | 2013-11-12 15:42:22 -0800 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2013-11-12 15:42:22 -0800 |
commit | 79a47162c95439db74f51c5e332f2904dd1ef3ae (patch) | |
tree | bfa67144c2e7b743afecb24337601005eaa00df8 /cryptography/hazmat/primitives/hmac.py | |
parent | 906e195b2ea255d0e8153c25d273c918ea313ce3 (diff) | |
parent | 73278747b04c3bfca3972d69a917c194db6c24e3 (diff) | |
download | cryptography-79a47162c95439db74f51c5e332f2904dd1ef3ae.tar.gz cryptography-79a47162c95439db74f51c5e332f2904dd1ef3ae.tar.bz2 cryptography-79a47162c95439db74f51c5e332f2904dd1ef3ae.zip |
Merge pull request #250 from alex/drop-inheritance
Drop random support for weird inheritance
Diffstat (limited to 'cryptography/hazmat/primitives/hmac.py')
-rw-r--r-- | cryptography/hazmat/primitives/hmac.py | 9 |
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, |