Skip to content

Instantly share code, notes, and snippets.

@pbojinov
Created March 26, 2014 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbojinov/9778394 to your computer and use it in GitHub Desktop.
Save pbojinov/9778394 to your computer and use it in GitHub Desktop.
base64 encode/decode
import base64
encoded = base64.b64encode('b604de2f-bfe4-4449-9f31-3d6695918327')
assert (encoded == 'YjYwNGRlMmYtYmZlNC00NDQ5LTlmMzEtM2Q2Njk1OTE4MzI3')
decoded = base64.b64decode(encoded)
assert (decoded == 'b604de2f-bfe4-4449-9f31-3d6695918327')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment