Skip to content

Instantly share code, notes, and snippets.

@anderson-marques
Created April 22, 2021 10:11
Show Gist options
  • Save anderson-marques/38086a13e5f9d186919333806bc6e544 to your computer and use it in GitHub Desktop.
Save anderson-marques/38086a13e5f9d186919333806bc6e544 to your computer and use it in GitHub Desktop.
import base64
encoded = base64.b64encode('data to be encoded')
print(encoded)
# prints 'ZGF0YSB0byBiZSBlbmNvZGVk'
data = base64.b64decode(encoded)
print(data)
# prints 'data to be encoded'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment