Encryptfile

WARNING: Version changes in openssl may not be compatible! Data may not be recoverable without the identical version of openssl!

Add this to the bottom of ~/.profile:

function encryptfile {
        openssl aes-256-cbc -a -in $1 -out $1.txt
}
function decryptfile {
        openssl aes-256-cbc -d -a -in $1.txt -out $1
}

Source the file:

$ . ~/.profile

Encrypt and decrypt:

$ encryptfile file.tgz
$ decryptfile file.tgz