Last active
August 29, 2015 14:07
-
-
Save mathisonian/6ec4b33b8196ff0dcfb1 to your computer and use it in GitHub Desktop.
encryption / decryption command line helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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