Skip to content

Instantly share code, notes, and snippets.

@olooney
Created February 29, 2012 22:33
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 olooney/1945016 to your computer and use it in GitHub Desktop.
Save olooney/1945016 to your computer and use it in GitHub Desktop.
Use openSSL to simply encrypt a file
# snippet from http://www.madboa.com/geek/openssl/#encrypt-simple
# encrypt file.txt to file.enc using 256-bit AES in CBC mode
openssl enc -aes-256-cbc -salt -in file.txt -out file.enc
To decrypt file.enc you or the file’s recipient will need to remember the cipher and the passphrase.
# decrypt binary file.enc
openssl enc -d -aes-256-cbc -in file.enc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment