Constructor
new HKP(keyServerBaseUrl, config)
Initialize the HKP client and configure it with the key server url and fetch function.
Parameters:
Name | Type | Description |
---|---|---|
keyServerBaseUrl |
String | (optional) The HKP key server base url including the protocol to use, e.g. 'https://pgp.mit.edu'; defaults to openpgp.config.keyserver (https://keyserver.ubuntu.com) |
config |
Object | (optional) full configuration, defaults to openpgp.config |
Methods
(async) lookup() → {Promise.<String>}
Search for a public key on the key server either by key ID or part of the user ID.
Parameters:
Name | Type | Description |
---|---|---|
options.keyId |
String | The long public key ID. |
options.query |
String | This can be any part of the key user ID such as name or email address. |
Returns:
The ascii armored public key.
- Type
- Promise.<String>
(async) upload(publicKeyArmored) → {Promise}
Upload a public key to the server.
Parameters:
Name | Type | Description |
---|---|---|
publicKeyArmored |
String | An ascii armored public key to be uploaded. |
Returns:
- Type
- Promise