Skip to content
Snippets Groups Projects
Unverified Commit aff9aca9 authored by Ayub's avatar Ayub Committed by GitHub
Browse files

Merge pull request #21461 from edx/BOM-294

BOM-294
parents 1c4a645d f80cbf3e
No related branches found
Tags release-2021-09-20-15.20
No related merge requests found
......@@ -97,7 +97,7 @@ def random_aes_key():
def pad(data):
""" Pad the given `data` such that it fits into the proper AES block size """
if six.PY3:
if six.PY3 and not isinstance(data, (bytes, bytearray)):
data = six.b(data)
padder = PKCS7(AES.block_size).padder()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment