aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography/hazmat/primitives/hashes.py
diff options
context:
space:
mode:
Diffstat (limited to 'cryptography/hazmat/primitives/hashes.py')
-rw-r--r--cryptography/hazmat/primitives/hashes.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/cryptography/hazmat/primitives/hashes.py b/cryptography/hazmat/primitives/hashes.py
index c7748118..c14d0437 100644
--- a/cryptography/hazmat/primitives/hashes.py
+++ b/cryptography/hazmat/primitives/hashes.py
@@ -39,15 +39,14 @@ class Hash(object):
def update(self, data):
if isinstance(data, six.text_type):
raise TypeError("Unicode-objects must be encoded before hashing")
- self._backend.hashes.update_ctx(self._ctx, data)
+ self._ctx.update(data)
def copy(self):
return self.__class__(self.algorithm, backend=self._backend,
- ctx=self._backend.hashes.copy_ctx(self._ctx))
+ ctx=self._ctx.copy())
def finalize(self):
- return self._backend.hashes.finalize_ctx(self._ctx,
- self.algorithm.digest_size)
+ return self._ctx.finalize()
@interfaces.register(interfaces.HashAlgorithm)