mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-02-04 13:21:34 +00:00
fixed memleak in keylistiterator
added encryptsign and decryptverify moved gpgme-init into objects_new
This commit is contained in:
parent
f70929193a
commit
6bacc28bb6
6 changed files with 231 additions and 112 deletions
14
examples/encryptsign.php
Normal file
14
examples/encryptsign.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?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);
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue