[securemail] Update Composer dependencies
[friendica-addons.git/.git] / securemail / vendor / singpolyma / openpgp-php / examples / verify.php
1 <?php
2
3 require_once dirname(__FILE__).'/../lib/openpgp.php';
4 require_once dirname(__FILE__).'/../lib/openpgp_crypt_rsa.php';
5
6 /* Parse public key from STDIN */
7 $wkey = OpenPGP_Message::parse(file_get_contents('php://stdin'));
8
9 /* Parse signed message from file named "t" */
10 $m = OpenPGP_Message::parse(file_get_contents('t'));
11
12 /* Create a verifier for the key */
13 $verify = new OpenPGP_Crypt_RSA($wkey);
14
15 /* Dump verification information to STDOUT */
16 var_dump($verify->verify($m));
17
18 ?>