diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-05-17 11:56:12 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-05-17 11:56:12 -0700 |
commit | 3b39ae4fc80020bba3d0c2888aa9c250b46e7071 (patch) | |
tree | f15f52d1403f158c26ff0951748e98f9c0781192 /cryptography/hazmat/primitives/hmac.py | |
parent | a741aad3bd7d6347b9816025cb4905558c2c71c6 (diff) | |
download | cryptography-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/hmac.py')
-rw-r--r-- | cryptography/hazmat/primitives/hmac.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cryptography/hazmat/primitives/hmac.py b/cryptography/hazmat/primitives/hmac.py index 5d7bad59..0f89df94 100644 --- a/cryptography/hazmat/primitives/hmac.py +++ b/cryptography/hazmat/primitives/hmac.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 @@ -46,7 +44,7 @@ class HMAC(object): def update(self, msg): if self._ctx is None: raise AlreadyFinalized("Context was already finalized") - if not isinstance(msg, six.binary_type): + if not isinstance(msg, bytes): raise TypeError("msg must be bytes") self._ctx.update(msg) @@ -68,7 +66,7 @@ class HMAC(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): |