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.



//  GnuPG from PHP - Where is the include ??
//  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();
$plain = gnupg_decrypt($res, $enc);

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



Reply via email to