Browse Source

Fix case of "words" so long that base64 splits them to several lines

master
The Dod 10 years ago
parent
commit
64c1a14473
  1. 2
      darkened.py

2
darkened.py

@ -38,7 +38,7 @@ def bytes2str(b):
return str(b, 'utf8', 'replace') return str(b, 'utf8', 'replace')
def bytes2base64(b): def bytes2base64(b):
return str(codecs.encode(b, 'base64').strip(), 'ascii') return str(codecs.encode(b, 'base64').strip(), 'ascii').replace('\n','')
def base642bytes(b64): def base642bytes(b64):
if b64 is None: return None # Might be missing if b64 is None: return None # Might be missing

Loading…
Cancel
Save