mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-12-23 18:21:40 +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);
|
|
?>
|