From 82c0c4fdd2d99150ed11c188fbc0586512b13edb Mon Sep 17 00:00:00 2001 From: Guinness Date: Fri, 21 Jan 2022 11:05:46 +0100 Subject: [PATCH] Fallback to hashlib instead of deprecated libs --- virtualsmartcard/src/vpicc/virtualsmartcard/CryptoUtils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/CryptoUtils.py b/virtualsmartcard/src/vpicc/virtualsmartcard/CryptoUtils.py index 56e0ed4..e1d4608 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/CryptoUtils.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/CryptoUtils.py @@ -31,8 +31,8 @@ try: except ImportError: # PyCrypto not available. Use the Python standard library. - import hmac as HMAC - import sha as SHA1 + from hashlib import hmac as HMAC + from hashlib import sha as SHA1 CYBERFLEX_IV = b'\x00' * 8