Skip to content

Commit

Permalink
Fixed import of b64encode from base64
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisPPLIN committed Sep 12, 2024
1 parent 8677fc5 commit 71b8ab3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion S3/Crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")

0 comments on commit 71b8ab3

Please sign in to comment.