aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography/hazmat/primitives/cmac.py
diff options
context:
space:
mode:
authorAyrx <terrycwk1994@gmail.com>2014-04-18 20:20:05 +0800
committerAyrx <terrycwk1994@gmail.com>2014-04-22 12:12:41 +0800
commita536085949f5bd1b479eb313ea1c0b114294c0fd (patch)
treeaea580b7e0925df1af668b55b523e56ea4771ddd /cryptography/hazmat/primitives/cmac.py
parent2124324a4aa678dc885ac20c5ac203663ac5f966 (diff)
downloadcryptography-a536085949f5bd1b479eb313ea1c0b114294c0fd.tar.gz
cryptography-a536085949f5bd1b479eb313ea1c0b114294c0fd.tar.bz2
cryptography-a536085949f5bd1b479eb313ea1c0b114294c0fd.zip
Various fixes
Diffstat (limited to 'cryptography/hazmat/primitives/cmac.py')
-rw-r--r--cryptography/hazmat/primitives/cmac.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cryptography/hazmat/primitives/cmac.py b/cryptography/hazmat/primitives/cmac.py
index bbf0bf9c..7e7f65ab 100644
--- a/cryptography/hazmat/primitives/cmac.py
+++ b/cryptography/hazmat/primitives/cmac.py
@@ -36,11 +36,11 @@ class CMAC(object):
raise TypeError(
"Expected instance of interfaces.BlockCipherAlgorithm"
)
- self.algorithm = algorithm
+ self._algorithm = algorithm
self._backend = backend
if ctx is None:
- self._ctx = self._backend.create_cmac_ctx(self.algorithm)
+ self._ctx = self._backend.create_cmac_ctx(self._algorithm)
else:
self._ctx = ctx
@@ -69,7 +69,7 @@ class CMAC(object):
if self._ctx is None:
raise AlreadyFinalized("Context was already finalized")
return CMAC(
- self.algorithm,
+ self._algorithm,
backend=self._backend,
ctx=self._ctx.copy()
)