examples for import and export

This commit is contained in:
Thilo Raufeisen 2005-10-15 14:43:36 +00:00
parent 584b0947f5
commit a64df7da8b
2 changed files with 35 additions and 0 deletions

5
examples/export.php Normal file
View file

@ -0,0 +1,5 @@
<?php
require_once (dirname(__FILE__)."/main.php");
$result = $gnupg -> export($testkey);
print_r($result);
?>

30
examples/import.php Normal file
View file

@ -0,0 +1,30 @@
<?php
require_once (dirname(__FILE__)."/main.php");
$testkey = '-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.6 (GNU/Linux)
mQGiBENQAKwRBADpy828KU+0SuoetJTrJ5dR86PiO3CsH8K6QRP7wY82Eh/9NTJ3
afRj0FNPaVSP0NciPeM4G4uFoQ3lsIf+FBEPXH1D97/XigWObU8K6ha2/s8wU98z
/samjTHLR+VKZ031B5/8p5Y49yvkkEyBkF1G85yeIXK0WZorKBPncRKuUwCgxOi/
IEa+ZuqHlmlDF2LTRIBOfrkEAK+WLRMWUD0bqj1TYwnxwPWiuns32/ZXLWuPfb5o
crNt7x5LSe7wJhjyIiFhiU0qR33X/FrT2umzOxlRYfINXT9DUHDocxxbED6fxAHw
X2IDd5tWXgCkSBHn2yAneNY6ycPdS3RvqJGlYFg7cOc0kz4urjqRt9fIagzpZQtL
fXHfBACl3EWgvLhVBo5ExZbrtlOA2q0x9UGhhNaSkeBWBr2qDeZErQjMTO0+viaN
/SX0zxeWtM3z06rkUHd1DKORDRM5R7shBTv9/Quojn0gbYbOem+e1mlCe27TRxcP
yeIKk00PqbVuff9QlK9GqKEWGzsEXCmxZ160Dul3CGlf/vQZHbQkdGVzdGtleSAo
dGVzdGtleSkgPHRlc3RAZXhhbXBsZS5uZXQ+iF4EExECAB4FAkNQAKwCGwMGCwkI
BwMCAxUCAwMWAgECHgECF4AACgkQLpbxQbPdKy58pwCfWttBa4bojGc+oVQbmx43
lMMTuP8An3INHAxsm0DkdhfergYi2f6BNMPmuQENBENQAK0QBACNXzJQG4NHUJqL
PImezbl+ii+93MjMo8L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