php-gnupg/examples/verify.php

25 lines
451 B
PHP
Raw Normal View History

2005-10-07 18:59:50 +00:00
<?php
require_once (dirname(__FILE__)."/main.php");
$mailtext = '
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Test test Test TeSt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFDRWw6BUn53IUVZtwRAoVKAJ9P0E0PKcpEuWeHNxgZRbctpETbGQCgv0Nq
TmrOEDxc5AihrFREY+IYPp4=
=933C
-----END PGP SIGNATURE-----
';
$plaintext = false;
2005-10-25 19:37:32 +00:00
$info = $gnupg -> verify ($mailtext,false,$plaintext);
2005-10-07 18:59:50 +00:00
print_r($info);
echo "\n".$plaintext."\n";
?>