Skip to content

Instantly share code, notes, and snippets.

@mlsaito mlsaito/base64.txt
Last active May 22, 2018

What would you like to do?
Convert strings to Base64 encoding in MacOS using OpenSS
Encoding to Base64:
$ echo '' | openssl base64
> bWFrb0ByaW5nY2FwdGNoYS5jb206c2FtcGxlUGFzc3dvcmQK
Decoding from Base64:
$ echo 'bWFrb0ByaW5nY2FwdGNoYS5jb206c2FtcGxlUGFzc3dvcmQK' | openssl base64 -d

This comment has been minimized.

Copy link
Owner Author

commented May 22, 2018

Helpful for converting account credentials to Base64 for Basic HTTP Header when making HTTP requests.

curl -H "Basic: bWFrb0ByaW5nY2FwdGNoYS5jb206c2FtcGxlUGFzc3dvcmQK"

Or you could simply just do:

curl --user ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.