Skip to content

Instantly share code, notes, and snippets.

@s-lyn
Last active April 27, 2017 08:46
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 s-lyn/fefc622e83abe21d016482193b5f3ac1 to your computer and use it in GitHub Desktop.
Save s-lyn/fefc622e83abe21d016482193b5f3ac1 to your computer and use it in GitHub Desktop.
Simple File Encryption with OpenSSL
# Create file
echo My_super_secret > secrets.txt
# Encrypt with password
openssl aes-256-cbc -a -salt -in secrets.txt -out secrets.txt.enc
# Decrypt with password input
openssl aes-256-cbc -d -a -in secrets.txt.enc -out secrets1.txt
# Decrypt with password as option
openssl aes-256-cbc -d -a -k qwerty -in secrets.txt.enc -out secrets2.txt
# Link: http://tombuntu.com/index.php/2007/12/12/simple-file-encryption-with-openssl/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment