Date Tags Python

PYTHON: base64 multiple lines

Here's how to use it.

>>> import base64
>>> base64.encodestring('hello world') 'aGVsbG8gd29ybGQ=\n'
>>> base64.decodestring(_) 'hello world'
>>>

If the text is long, the base64 module will split the encoded data into multiple lines. And thus we need to replace '\n' in results.


Comments

comments powered by Disqus