<< back to sysax.com Product page

12.7. Exporting Public and Private Keys

The PGPExportPrivKey and PGPExportPubKey methods can be used to export a public or private key from the keyring.

Exhibit 12.13. IDL Definition of method to exporting public and private keys



HRESULT PGPExportPrivKey([in] BSTR b_username, [in] BSTR b_outfilename, [in, defaultvalue("")] BSTR b_keyringfile);
HRESULT PGPExportPubKey ([in] BSTR b_username, [in] BSTR b_outfilename, [in, defaultvalue("")] BSTR b_keyringfile);


Exhibit 12.14. Example usage of method to exporting public and private keys (VBScript)


app.PGPExportPrivKey "myuser", "myuser-privkey.txt", ""
app.PGPExportPubKey "myuser", "myuser-pubkey.txt", ""