<< back to sysax.com Product page

12.6. Importing Public and Private Keys

The PGPImportPrivKey and PGPImportPubKey methods can be used to import a private or public key into the keyring.

Exhibit 12.11. IDL Definition of method to importing public and private keys



HRESULT PGPImportPrivKey ([in] BSTR b_keyfile, [in, defaultvalue("")] BSTR b_keyringfile);
HRESULT PGPImportPubKey  ([in] BSTR b_keyfile, [in, defaultvalue("")] BSTR b_keyringfile);


Exhibit 12.12. Example usage of method to importing public and private keys (VBScript)


app.PGPImportPrivKey "user-privkey.txt", ""
app.PGPImportPubKey "user-pubkey.txt", ""