Skip to content

Commit 32542a0

Browse files
committed
Fixed AES CBC encryption.
1 parent 82734df commit 32542a0

File tree

2 files changed

+107
-134
lines changed

2 files changed

+107
-134
lines changed

src/cryptojwt/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import logging
55
import re
66
import struct
7-
import six
87

98
from cryptojwt.exception import BadSyntax
109

@@ -59,7 +58,7 @@ def long_to_base64(n):
5958

6059

6160
def base64_to_long(data):
62-
if isinstance(data, six.text_type):
61+
if isinstance(data, str):
6362
data = data.encode("ascii")
6463

6564
# urlsafe_b64decode will happily convert b64encoded data
@@ -190,7 +189,7 @@ def bytes2str_conv(item):
190189
"""
191190
if isinstance(item, bytes):
192191
return item.decode("utf-8")
193-
elif item is None or isinstance(item, (six.string_types, int, bool)):
192+
elif item is None or isinstance(item, (str, int, bool)):
194193
return item
195194
elif isinstance(item, list):
196195
return [bytes2str_conv(i) for i in item]

0 commit comments

Comments
 (0)