A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/openpgpjs/hkp-client below:

openpgpjs/hkp-client: Client for the OpenPGP HTTP Keyserver Protocol (HKP) to lookup and upload keys

This libary implements a client for the OpenPGP HTTP Keyserver Protocol (HKP) in order to lookup and upload keys on standard public key servers.

Lookup public key on HKP server
import HKP from '@openpgp/hkp-client';
import { readKey } from 'openpgp';

(async () => {
  const hkp = new HKP(); // Defaults to https://keyserver.ubuntu.com, or pass another keyserver URL as a string
  const publicKeyArmored = await hkp.lookup({
      query: 'alice@example.com'
  });
  const publicKey = await readKey({
    armoredKey: publicKeyArmored
  });
})();
Upload public key to HKP server
import HKP from '@openpgp/hkp-client';
(async () => {
  const hkp = new HKP('https://pgp.mit.edu');

  const publicKeyArmored = `-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK-----`;

  await hkp.upload(publicKeyArmored);
})();

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4