Skip to content

Instantly share code, notes, and snippets.

@rlueder
Created December 8, 2017 17:45
Show Gist options
  • Save rlueder/4a81575547fd7c745ae315e0329ecade to your computer and use it in GitHub Desktop.
Save rlueder/4a81575547fd7c745ae315e0329ecade to your computer and use it in GitHub Desktop.
encode/decode strings to/from base64 on the terminal
// Encode
echo -n 'username:password' | openssl base64
// dXNlcm5hbWU6cGFzc3dvcmQ=
// Decode
echo `echo dXNlcm5hbWU6cGFzc3dvcmQ= | base64 --decode`
// username:password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment