i am completely stuck with a pgp problem, but I guess it's more a logical than a technical problem - anyway, i don't get it.
The goal is to encrypt a file with gpg4win (www.gpg4win.de/index.html) and decrypt it with PHP (gnupg).
First thing I did, I've created a certificate with gpg4win, set a passphrase and encrypted a simple text file (ASCII). Then I upload the file and tried to decrypt it with the following code:
$content = file_get_contents("some-test-data.asc");
$gpg = new gnupg();
$gpg -> adddecryptkey("MYFINGERPRINT","my.pass.phrase");
$plain = $gpg -> decrypt($content);
var_dump($plain);
The result was: bool(false)
What I am doing wrong? I've tried different code and suggestions, but always ended up with bool(false).
Are these methods not compatible, do I have to a different application?
I appreciate every little help I could get. Thanks alot!
P.S. PHP is compiled with gnupg GPGme Version 1.4.2 Extension Version 1.3.3-dev