I want to encrypt and decrypt one file using one password.
How can I use OpenSSL to do that?
Security Warning: AES-256-CBC does not provide authenticated encryption and is vulnerable to padding oracle attacks. You should use something like age instead.
Encrypt:
openssl aes-256-cbc -a -salt -in secrets.txt -out secrets.txt.enc
Decrypt:
openssl aes-256-cbc -d -a -in secrets.txt.enc -out secrets.txt.new