mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-11-23 06:47:10 +00:00
15 lines
390 B
PHP
15 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);
|
||
|
?>
|