Socket
Socket
Sign inDemoInstall

@dumbmatter2/gpg-stream-error-handling

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dumbmatter2/gpg-stream-error-handling

GPG encryption and decryption in node.js by way of the gpg command-line tool


Version published
Weekly downloads
1
Maintainers
1
Install size
31.1 kB
Created
Weekly downloads
 

Readme

Source

GPG Encryption/Decryption in Node.js

travis npm downloads

This module is a wrapper around gpg for use within Node. Node-GPG takes care of spawning gpg, passing it the correct arguments, and piping input to stdin. It can also pipe input in from files and output out to files.

Use Node-GPG if you are considering calling gpg directly from your application.

Requirements

In order to use Node-GPG, you'll need to have the gpg binary in your $PATH.

Installation

npm install gpg

Usage

Node-GPG supports both direct calls to GPG with string arguments, and streaming calls for piping input and output from/to files.

See the source for more details.

If a function you need is not implemented, you can call gpg directly with arguments of your choice by calling gpg.call(stdinStr, argsArray, cb), or gpg.callStreaming(inputFileName, outputFileName, argsArray, cb).

Notes

Existing implementations of PGP in Javascript are blocking and unfeasibly slow for server use. In casual testing, encrypting a simple 400-character email to an El-Gamal key took upwards of 11 seconds using openpgpjs and 14 seconds with kbpgp, but takes less than 0.1 seconds with gpg directly.

Contributors

The following are the major contributors of node-gpg (in no specific order).

Keywords

FAQs

Last updated on 06 Aug 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc