Created
June 14, 2013 15:26
-
-
Save dce/5782728 to your computer and use it in GitHub Desktop.
Encrypt/decrypt a file
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
#!/bin/sh | |
openssl aes-256-cbc -d -a -pass "pass:$2" -in $1 -out `echo $1 | sed 's/\.enc$//'` |
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
#!/bin/sh | |
openssl aes-256-cbc -a -salt -pass "pass:$2" -in $1 -out $1.enc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try:$1 -out $ {1%.enc}
openssl aes-256-cbc -d -a -pass "pass:$2" -in