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.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cryptography/hazmat/primitives/hashes.py b/cryptography/hazmat/primitives/hashes.py
index 04f7620a..8c2284e3 100644
--- a/cryptography/hazmat/primitives/hashes.py
+++ b/cryptography/hazmat/primitives/hashes.py
@@ -32,7 +32,7 @@ class Hash(object):
if not isinstance(algorithm, interfaces.HashAlgorithm):
raise TypeError("Expected instance of interfaces.HashAlgorithm.")
- self.algorithm = algorithm
+ self._algorithm = algorithm
self._backend = backend
@@ -41,6 +41,8 @@ class Hash(object):
else:
self._ctx = ctx
+ algorithm = utils.read_only_property("_algorithm")
+
def update(self, data):
if self._ctx is None:
raise AlreadyFinalized("Context was already finalized.")