I'm using a command to encrypt and decrypt files based on a password:
openssl aes-256-cbc -a -salt -in secrets.txt -out secrets.txt.enc --pass pass:mypassword
openssl aes-256-cbc -d -a -in secrets.txt.enc -out secrets.txt.new -pass pass:mypassword
Someone had mentioned that this may be susceptible to brute force attacks (to try and decrypt the file via a password).
Is there a safer/better way to encrypt a file with a password than this? a -pbkdf2 option was also mentioned, but I can't seem to find much on it.
I was under the impression that AES-256 with salt was a really good option to choose for password encrypting a file.
If the password is long and very complex, would that also help the situation?