Wednesday, September 11, 2019

Python base64 encode and decode

Mac OS X and Linux

import base64
base64.decodestring('QmFkU2VjdG9yIHdhcyBoZXJl')

-----------------------------

Base64.encodestring('Text to encode')


Windows 10 Python 3.7

import base64
base64.b64decode(b'QmFkU2VjdG9yIHdhcyBoZXJl')

-----------------------------

base64.b64encode(b'Text to encode')

I prefere Mac OS X or Linux but it does work in Windows 10


No comments:

Post a Comment