summaryrefslogtreecommitdiff
path: root/mail/src
diff options
context:
space:
mode:
Diffstat (limited to 'mail/src')
-rw-r--r--mail/src/leap/mail/walk.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mail/src/leap/mail/walk.py b/mail/src/leap/mail/walk.py
index 17349e6..c116601 100644
--- a/mail/src/leap/mail/walk.py
+++ b/mail/src/leap/mail/walk.py
@@ -24,10 +24,11 @@ from cryptography.hazmat.primitives import hashes
from leap.mail.utils import first
+crypto_backend = MultiBackend([OpenSSLBackend()])
+
def get_hash(s):
- backend = MultiBackend([OpenSSLBackend()])
- digest = hashes.Hash(hashes.SHA256(), backend)
+ digest = hashes.Hash(hashes.SHA256(), crypto_backend)
digest.update(s)
return digest.finalize().encode("hex").upper()