I need to use PHP to dencrypt a file with GPG (which was encrypted with
a public key generated on the server) I would normally use the exec
command to just execute the proper GPG command, but I can't seem to get
the password for the key (to decrypt the file) into GPG, I have tried:

exec("/usr/bin/gpg --decrypt /path/to/file < /bin/echo \"password\"");


exec("/bin/echo \"password\" | /usr/bin/gpg --decrypt /path/to/file");

And neither work, anyone else ever done this successfully?

Adam Voigt

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to