Sep 19, 2018

Base64 encoding is a standard method for converting 8-bit binary information into a limited subset of ASCII characters.

Base64 Encode & Decode is needed for safe transport through e-mail systems, and other systems that are not 8-bit safe.

By default the encrypted file by openssl is in a binary format.

If you are going to send it by email, IRC, etc. you have to save encrypted file in Base64-encode.

To encrypt file in Base64-encode, you should add -a option:
$ openssl enc -aes-256-cbc -salt -a -in file.txt -out file.txt.enc
OptionDescription
-aTells OpenSSL that the encrypted data is in Base64-ensode
Option -a should also be added while decryption:
$ openssl enc -aes-256-cbc -d -a -in file.txt.enc -out file.txt