관리-도구
편집 파일: gnupg_res_export.phpt
--TEST-- export a key --SKIPIF-- <?php if (!extension_loaded("gnupg")) die("skip"); ?> --FILE-- <?php require_once "gnupgt.inc"; gnupgt::import_key(); $gpg = gnupg_init(); gnupg_seterrormode($gpg, GNUPG_ERROR_WARNING); $ret = gnupg_export($gpg, $fingerprint); var_dump($ret); ?> --EXPECTF-- string(%d) "-----BEGIN PGP PUBLIC KEY BLOCK----- mQENBF11JawBCAC6bWTtKtAj1dBih/UHR9iH1iADEmZde52aKyd7EXKtjs4Q2aXJ kbn9R+kcJNx+AlnTSePQBkNz5brmEAQgk93rOsHaPUEROkfBR2C6AkjaJNnk0E43 pbUy6bWhmGR4kmpbvRnR/7kxVyplb5zSFAcio1I8RQ3ql0HkF//zLUouYzrMJn6e GvffHw1revlSxo0leCcOsNE7AHGVgMxvUWYO0JT4Fs+JcpsTxG8MFE6I6SLZoY5W XmtOsO0vMNJoTaXdqfJoLTkviPkRUZuF0DtzuT1oQLUTTaKvWxx2+33YF5HYrlNy eepLFLh5mZ1/2HFWoQo2X1gFfb1R9EJPbFtJABEBAAG0GVBIUCBHbnVQRyA8Z251 cGdAcGhwLm5ldD6JATgEEwECACIFAl11JawCGwMGCwkIBwMCBhUIAgkKCwQWAgMB Ah4BAheAAAoJEGaed14KYoSzo2QH/AxR9nAqevgbp2GHw+xw4R8XVHMeL2atROFU ndldeYmtVNGh8ck/YSxMz/FY2qLbN3421xOi/ct7nVl77MLZxgZAnsD5qnm0doJl Su/URzUmyhinKLmB9AdklGJNXrL0/dWF0t46Dmv+4W+Qnx3mNhZBUbSW5Ut2pXq0 d4XPTHfkQWgaTPblw97ncQzwVmDSLRqoJEl3yo3OW8/uE1a/ldivuMux5IEcA03l 5L/5g2QOe9cRxk+x9JCXBPqjJ9OIVMUUReGBVSfscGAhnD0bW/aNf5//eGkU9Gai CCSdnIKCopRJSIZcv3OF+P+vh3gmGXAByyQKRvwpBdvosIsiEXi5AQ0EXXUlrAEI AO43Q3D/Vg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