emailjs-pgp-builder
Builds PGP/MIME, no magic/encryption included.
Usage
const PGPBuilder = ;const builder = ;
This is the expected data format...
let message = subject: 'foo' date: from: name: 'Fred Foo' address: 'fred@foobar.bar' to: name: 'Bla Foo' address: 'bla@foobar.bar' cc: name: 'Bli Foo' address: 'bli@foobar.bar' bcc: name: 'Blu Foo' address: 'Blu@foobar.bar' id: '368357@foobar.bar' inReplyTo: '112342356@foobar.bar' text: 'asd' html: '<html><head></head><body>asd</body></html>' attachments: ;
API
- #buildEncrypted
- #buildSigned
- #buildPlaintext
Build a signed MIME structure
let mimeRoot = builder; // Crypto not includedlet signature = ; builder; // Find the results of the operation here:consoleconsole
NB! pgpsign is whatever you use to PGP-sign the content.
Build a encrypted MIME structure
let mimeRoot = builder; // Crypto not includedlet ciphertext = ; builder; // Find the results of the operation here:consoleconsole
NB! pgpencrypt is whatever you use to PGP-encrypt the content.
License
MIT