Skip to content

Instantly share code, notes, and snippets.

@AlexanderMike
Created December 12, 2018 18:40
Show Gist options
  • Select an option

  • Save AlexanderMike/28d1900acbf9e9652f2a8cc54d73c331 to your computer and use it in GitHub Desktop.

Select an option

Save AlexanderMike/28d1900acbf9e9652f2a8cc54d73c331 to your computer and use it in GitHub Desktop.
base64 encoding python
#base64 needs bytes like object so encode string first
import base64
test = 'test'
test = test.encode('utf-8')
test_b64encoded = base64.b64encode(test)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment