Created
August 5, 2009 16:14
-
-
Save fernandotakai/162786 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/sh | |
if [ "$1" == "" ]; then | |
echo "decrypt file" | |
exit 1 | |
fi | |
openssl aes-256-cbc -d -in "$1" -out "$1_dec" 2> /dev/null | |
if [ "$?" == "0" ]; then | |
echo "Decrypting..." | |
rm -fr "$1" | |
mv "$1_dec" "$1" | |
fi |
This file contains 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
#!/bin/sh | |
if [ "$1" == "" ]; then | |
echo "encrypt file" | |
exit 1 | |
fi | |
openssl aes-256-cbc -salt -in "$1" -out "$1_enc" | |
mv "$1_enc" "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment