Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@openpgp/hkp-client

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openpgp/hkp-client

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

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
97
decreased by-43.27%
Maintainers
2
Weekly downloads
 
Created
Source

HKP Client

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

Examples

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);
})();

Keywords

FAQs

Package last updated on 06 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc