Skip to content

Instantly share code, notes, and snippets.

@mathisonian
Last active August 29, 2015 14:07
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 mathisonian/6ec4b33b8196ff0dcfb1 to your computer and use it in GitHub Desktop.
Save mathisonian/6ec4b33b8196ff0dcfb1 to your computer and use it in GitHub Desktop.
encryption / decryption command line helpers
encrypt() {
openssl des3 -in $1 -out $1.encrypted
}
decrypt() {
if [[ "$1" == *.encrypted ]]
then
openssl des3 -d -in $1 -out $(basename $1 .encrypted)
else
openssl des3 -d -in $1 -out $1.decrypted
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment