aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography/hazmat/primitives/cmac.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-05-17 11:56:12 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-05-17 11:56:12 -0700
commit3b39ae4fc80020bba3d0c2888aa9c250b46e7071 (patch)
treef15f52d1403f158c26ff0951748e98f9c0781192 /cryptography/hazmat/primitives/cmac.py
parenta741aad3bd7d6347b9816025cb4905558c2c71c6 (diff)
downloadcryptography-3b39ae4fc80020bba3d0c2888aa9c250b46e7071.tar.gz
cryptography-3b39ae4fc80020bba3d0c2888aa9c250b46e7071.tar.bz2
cryptography-3b39ae4fc80020bba3d0c2888aa9c250b46e7071.zip
We don't need six.binary_type, it's always bytes
Diffstat (limited to 'cryptography/hazmat/primitives/cmac.py')
-rw-r--r--cryptography/hazmat/primitives/cmac.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/cryptography/hazmat/primitives/cmac.py b/cryptography/hazmat/primitives/cmac.py
index b01c5170..7f7cc0f0 100644
--- a/cryptography/hazmat/primitives/cmac.py
+++ b/cryptography/hazmat/primitives/cmac.py
@@ -13,8 +13,6 @@
from __future__ import absolute_import, division, print_function
-import six
-
from cryptography import utils
from cryptography.exceptions import (
AlreadyFinalized, InvalidSignature, UnsupportedAlgorithm, _Reasons
@@ -47,7 +45,7 @@ class CMAC(object):
def update(self, data):
if self._ctx is None:
raise AlreadyFinalized("Context was already finalized")
- if not isinstance(data, six.binary_type):
+ if not isinstance(data, bytes):
raise TypeError("data must be bytes")
self._ctx.update(data)
@@ -59,7 +57,7 @@ class CMAC(object):
return digest
def verify(self, signature):
- if not isinstance(signature, six.binary_type):
+ if not isinstance(signature, bytes):
raise TypeError("signature must be bytes")
digest = self.finalize()
if not constant_time.bytes_eq(digest, signature):