GnuPG from PHP - Where is the include ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please advise - I'guess it is not a build in and looking for the GnuPG PHP include as
all the GnuPG functions are now considered undefined.

See below.

Thanks

Eli

//  GnuPG from PHP - Where is the include ??
//  http://www.gnupg.org/gph/en/manual.html
//  http://www.gnupg.org/documentation/howtos.en.html
//  GnuPG allows to encrypt and sign your data and communication,
//  features a versatile key management system as well as access
//  modules for all kinds of public key directories.
//

echo "GNU Encrypt with agreed secret key between sides.";

$secret_key = "8660281B6051D071D94B5B230549F9DC851566DC"; // Only shared parties know this $the_secret_content = "this is a very secret XML keep the secret key in the server and client well hidden from 4rd parties"; // Only shared parties know this

echo "Secret Key between Parties: [$secret_key] <br>";
echo "The sensitive content to keep safe <br>
     from 3rd parties: <b> $the_secret_content </b><br>";


//Creating the encryption content
                    $res = gnupg_init();
gnupg_addencryptkey($res, $secret_key);
$enc = gnupg_encrypt($res, $the_secret_content);
echo "This is the sensitive content encrypted by strong shared secret key:[".$enc."] <br>";

echo "Secret Key between Parties: [$secret_key] <br>";

                     $res = gnupg_init();
gnupg_adddecryptkey($res,$secret_key);
$plain = gnupg_decrypt($res, $enc);

echo "This is the sensitive content decrypted by recieving party <br>
     that has the shared secret key:[".$plain."] <br>";

_

_

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux