I would like to know how can i decrypt a file by passing the passphrase/secret key in the command line.
I tried using this, but its still giving me a prompt to enter the passphrase.
echo shell_exec("echo $passphrase | gpg --passphrase-fd 0 -o $unencrypted_file -d $encrypted_file");
My goal is to created a program in PHP that can decrypt the files automatically.