Remove Crypto.Util.py3compat.unhexlify and hexlify

This commit is contained in:
Helder Eijs 2018-09-25 22:51:27 +02:00
parent b8f81b7e6e
commit 96517333f4
26 changed files with 156 additions and 146 deletions

View file

@ -78,7 +78,6 @@ if sys.version_info[0] == 2:
return bs
def byte_string(s):
return isinstance(s, str)
from binascii import hexlify, unhexlify
# In Pyton 2.x, StringIO is a stand-alone module
from StringIO import StringIO as BytesIO
@ -115,11 +114,6 @@ else:
def byte_string(s):
return isinstance(s, bytes)
import binascii
hexlify = binascii.hexlify
unhexlify = binascii.unhexlify
del binascii
# In Python 3.x, StringIO is a sub-module of io
from io import BytesIO
from sys import maxsize as maxint