diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-10-22 17:07:26 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-10-22 17:07:26 -0700 |
commit | e17bd00da8f7805bb7ed469d50c5ac2d5433fc72 (patch) | |
tree | 7b95aba1c79b9b0fd313c596810ba1b98262e571 /cryptography | |
parent | 5b699cceabf0973f1232d1da269cfef0d64da2d9 (diff) | |
parent | 463db6846a94e29b7ef565d176457f329e6d6db6 (diff) | |
download | cryptography-e17bd00da8f7805bb7ed469d50c5ac2d5433fc72.tar.gz cryptography-e17bd00da8f7805bb7ed469d50c5ac2d5433fc72.tar.bz2 cryptography-e17bd00da8f7805bb7ed469d50c5ac2d5433fc72.zip |
Merge pull request #153 from reaperhulk/hash-ctx-copy-api
When copying a hash, pass the api through to the new object
Diffstat (limited to 'cryptography')
-rw-r--r-- | cryptography/primitives/hashes.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cryptography/primitives/hashes.py b/cryptography/primitives/hashes.py index 7133a916..3aa52462 100644 --- a/cryptography/primitives/hashes.py +++ b/cryptography/primitives/hashes.py @@ -37,7 +37,7 @@ class BaseHash(six.with_metaclass(abc.ABCMeta)): self._api.update_hash_context(self._ctx, data) def copy(self): - return self.__class__(ctx=self._copy_ctx()) + return self.__class__(api=self._api, ctx=self._copy_ctx()) def digest(self): return self._api.finalize_hash_context(self._copy_ctx(), |