more tests

removed examples
This commit is contained in:
Thilo Raufeisen 2006-11-03 12:39:53 +00:00
parent f98e3c57e4
commit ba4ad8960b
33 changed files with 478 additions and 121 deletions

View file

@ -0,0 +1,20 @@
--TEST--
encrypt and decrypt a text
--FILE--
<?php
require_once(dirname(__FILE__)."/vars.inc");
$gpg = gnupg_init();
gnupg_seterrormode($gpg, GNUPG_ERROR_WARNING);
gnupg_addencryptkey($gpg, $fingerprint);
$enc = gnupg_encrypt($gpg, $plaintext);
$gpg = NULL;
$gpg = gnupg_init();
gnupg_adddecryptkey($gpg, $fingerprint, $passphrase);
$ret = gnupg_decrypt ($gpg, $enc);
var_dump($ret);
?>
--EXPECTF--
string(7) "foo bar"