diff options
Diffstat (limited to 'mail/src/leap')
-rw-r--r-- | mail/src/leap/mail/walk.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mail/src/leap/mail/walk.py b/mail/src/leap/mail/walk.py index 17349e6a..c1166014 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() |