Apr 23, 2013

Quick openssl encrypt and decrypt with AES-256


To encrypt:
./encrypt.sh [plaintext file]

To decrypt:
./decrypt.sh [encrypted file]


$ cat encrypt.sh 
openssl enc -aes-256-cbc -a -in $1 -out $1.e -pass file:passwd.txt
$ cat decrypt.sh 
openssl enc -d -a -aes-256-cbc  -pass file:passwd.txt -in $1 

Ensure that passwd.txt is located in the same directory