php-gnupg/examples/encryptsign.php
Thilo Raufeisen 6bacc28bb6 fixed memleak in keylistiterator
added encryptsign and decryptverify
moved gpgme-init into objects_new
2005-10-09 15:55:02 +00:00

14 lines
390 B
PHP

<?php
require_once (dirname(__FILE__)."/main.php");
$gnupg -> setSignerKey ($fingerprint);
$gnupg -> setEncryptKey ($fingerprint);
$gnupg -> setPassPhrase ($passphrase);
$text = $gnupg -> encryptsign ($mailtext);
echo $text;
echo "\n-------------------------\n";
$plaintext = false;
$retval = $gnupg -> decryptverify ($text,$plaintext);
print_r($retval);
print_r($plaintext);
?>