pgp-encrypt-content
send a pgp contact form email
Last updated 4 years ago by lrlna .
MIT · Original npm · Tarball · package.json
$ cnpm install pgp-encrypt-content 
SYNC missed versions from official npm registry.

pgp-encrypt-content

A library to encrypt your message given a public pgp key. Useful in things like client-side contact forms when you would like to make sure emails sent over are encrypted. Uses an openpgp standard to encrypt ????

usage

var PgpContent = require('pgp-encrypt-content')

var pgpContent = PgpContent({
  contents: 'i cant quit you babbyyy',
  pgpKey: '-----BEGIN PGP PUBLIC KEY BLO'
})

pgpContent.send(function (err, val) {
  if (err) console.log(err)
  console.log(val)
})

pgpContent = PgpContent(opts)

Create an instance of pgp-encrypt-content. Takes in an opts object with the following keys:

  • opts.contents: a string or an array of values you would like to encrypt
  • opts.pgpKey: a public pgp key string

pgpContent.send()

This returns an encrypted string to be used in your application. pgp-encrypt-content will import from an armored pgp key you provided and encrypt your message.

related content

install

Install with npm:

npm install pgp-encrypt-content 

Current Tags

  • 1.0.2                                ...           latest (4 years ago)

3 Versions

  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |