Encrypt or Decrypt a file

 for e-mail transfer

Choose a cipher (CBC), and also specify you want to base64-encode the data.
Doing so will mean the encrypted data can be, say, pasted into an email message.

Encrypt file.txt to file.enc using 256-bit AES in CBC mode - the output is base64 encoded.
openssl enc -aes-256-cbc -a -salt -in file.txt -out file.enc

To decrypt file.enc you or the file’s recipient must specify the cipher and the passphrase.

Decrypt base64-encoded version
openssl enc -d -aes-256-cbc -a -in file.enc -out file.txt