Skip to content

Instantly share code, notes, and snippets.

@nolim1t
Created July 29, 2014 03:37
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 nolim1t/5a1cad9b7289da3dbe4c to your computer and use it in GitHub Desktop.
Save nolim1t/5a1cad9b7289da3dbe4c to your computer and use it in GitHub Desktop.
encrypt and decrypt at the commend line
# Find out what you want to encrypt (maybe even pipe a file into it)
echo -n "Some text to encrypt" | openssl enc -e -aes-256-cbc -a -salt
# Then choose a password
# To decrypt (will need the password you used to ecnrypt)
# You can also pipe in a file which should return the original document
echo "encrypted string" | openssl enc -d -aes-256-cbc -a -salt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment