fixed failing test;
This commit is contained in:
Ayub khan
2019-08-27 16:45:46 +05:00
parent 5dc63a9aab
commit f80cbf3ed4

View File

@@ -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()