From ee1bcce275241d5e12cb15f5867cd0226c2bca2e Mon Sep 17 00:00:00 2001 From: Stanislav Mikhaylov Date: Mon, 8 Oct 2018 18:23:54 +0300 Subject: [PATCH] Multiple public keys code Update README.md with the code example by @avimar (https://github.com/openpgpjs/openpgpjs/issues/271#issuecomment-274901731). Think that it's too hard to find and missed in documentation. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 88f532f4..1769cec2 100644 --- a/README.md +++ b/README.md @@ -344,6 +344,16 @@ openpgp.generateKey(options).then(function(key) { }); ``` +#### Encrypt with multiple public keys + +```js + publicKeys: [ // for encryption + openpgp.key.readArmored(pubkey1).keys[0], + openpgp.key.readArmored(pubkey2).keys[0] + ] + }; +``` + #### Revoke a key Using a revocation signature: