mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-12-23 10:21:39 +00:00
14 lines
414 B
PHP
14 lines
414 B
PHP
<?php
|
|
require_once (dirname(__FILE__)."/main.php");
|
|
|
|
$gnupg -> addSignKey ($fingerprint,$passphrase);
|
|
$gnupg -> addEncryptKey ($fingerprint);
|
|
$text = $gnupg -> encryptsign ($mailtext);
|
|
echo $text;
|
|
echo "\n-------------------------\n";
|
|
$plaintext = false;
|
|
$gnupg -> addDecryptKey ($fingerprint,$passphrase);
|
|
$retval = $gnupg -> decryptverify ($text,$plaintext);
|
|
print_r($retval);
|
|
print_r($plaintext);
|
|
?>
|