i think this is my favorite function so far...
you pass it the name of a file (non-existing) <filename>
then pass it the name of the person you are encrypting for
it then opens a vi session with the name of the file <filename>
once you exit vi, it encrypts whatever was written there and saves <filename>
as a regular file named whatever you named it, and it saves the encrypted version
as <filename>.<person>-encrypted.
Code:
function create_encrypted_ascii_file
{
file=$1;
person=$2;
vi "$file";
gpg -sea --output "$file.$person-encrypted" --recipient "$person" "$file";
clear;
echo ":: Encrypted file created";
echo ":: File saved as $1.$person-encrypted";
echo ":: Contents of file shown below";
echo -e "\n\n";
}