Use this command to create an encrypted, password-protected version of a file:
openssl enc -pbkdf2 -aes-256-cbc \
-in foo.bar \
-out foo.bar.encYou will be prompted to type and then confirm a password for the file.
To decrypt this file somewhere else, use this:
openssl enc -d -pbkdf2 -aes-256-cbc \
-in foo.bar.enc \
-out foo.barYou will be prompted to provide the same password to perform decryption.