Skip to content

Instantly share code, notes, and snippets.

@igor-brishkoski
Last active January 2, 2018 22:53
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 igor-brishkoski/40940d125d55cf6dd500b3581ccaa75f to your computer and use it in GitHub Desktop.
Save igor-brishkoski/40940d125d55cf6dd500b3581ccaa75f to your computer and use it in GitHub Desktop.
Encrypt/Decrypt file
https://superuser.com/questions/370388/simple-built-in-way-to-encrypt-and-decrypt-a-file-on-a-mac-via-command-line
# encrypt file.txt to file.enc using 256-bit AES in CBC mode
openssl enc -aes-256-cbc -salt -in secrets.properties -out secrets.properties.enc
# the same, only the output is base64 encoded for, e.g., e-mail
openssl enc -aes-256-cbc -a -salt -in secrets.properties -out secrets.properties.enc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment