Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save leandrodasilvaalves/2d4739529fc73e3dc01e26ee6beda759 to your computer and use it in GitHub Desktop.
Save leandrodasilvaalves/2d4739529fc73e3dc01e26ee6beda759 to your computer and use it in GitHub Desktop.
base64 encoding and decoding

base64 encoding and decoding

Useful for decoding email message attachments

Source: http://superuser.com/questions/120796/os-x-base64-encode-via-command-line

To decode from Base64

openssl base64 -d -in <infile> -out <outfile>

OR

cat <filename> | openssl base64 -d

To encode to Base64

openssl base64 -in <infile> -out <outfile>

openssl is installed by default on Mac OS X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment