diff options
Diffstat (limited to 'cryptography/hazmat/primitives/hashes.py')
-rw-r--r-- | cryptography/hazmat/primitives/hashes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cryptography/hazmat/primitives/hashes.py b/cryptography/hazmat/primitives/hashes.py index 35b677b0..2efd8484 100644 --- a/cryptography/hazmat/primitives/hashes.py +++ b/cryptography/hazmat/primitives/hashes.py @@ -46,8 +46,8 @@ class Hash(object): def update(self, data): if self._ctx is None: raise AlreadyFinalized("Context was already finalized") - if isinstance(data, six.text_type): - raise TypeError("Unicode-objects must be encoded before hashing") + if not isinstance(data, six.binary_type): + raise TypeError("data must be bytes") self._ctx.update(data) def copy(self): |