From 71b8ab39900fab662295306220e562ecdb67c162 Mon Sep 17 00:00:00 2001 From: AlexisPPLIN Date: Thu, 12 Sep 2024 15:11:13 +0200 Subject: [PATCH] Fixed import of b64encode from base64 --- S3/Crypto.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/S3/Crypto.py b/S3/Crypto.py index 136443e4..ef9d1661 100644 --- a/S3/Crypto.py +++ b/S3/Crypto.py @@ -20,6 +20,8 @@ # Python 2 support from base64 import encodestring +from base64 import b64encode + from . import Config from logging import debug from .BaseUtils import encode_to_s3, decode_from_s3, s3_quote, md5, unicode @@ -351,6 +353,6 @@ def sha256_hash_to_base64(sha256_hash): # Extract digest from sha256 hash sha256_hash_digest = sha256_hash.digest() # Then convert it to base64 - sha256_hash_digest_b64 = base64.b64encode(sha256_hash_digest).decode() + sha256_hash_digest_b64 = b64encode(sha256_hash_digest).decode() return sha256_hash_digest_b64 __all__.append("sha256_hash_to_base64")