operator-time
quadrismegistus 4 years ago
parent 85fa1f190c
commit c11d490e5d

@ -35,6 +35,7 @@ class Crypt(Logger):
# return zlib.adler32(binary_data)
def force_binary(self,k_b):
if k_b is None: return b''
if type(k_b)==str: k_b=k_b.encode()
if type(k_b)!=bytes: k_b=k_b.decode()
return k_b

Loading…
Cancel
Save