Most of the existing documentation is in the actual JS files, so looking in
there is your best bet for how to solve these problems. There have been
some discussions of adding onto documentation but as far as I know this has
not yet been done.

To directly answer your question:
(from src/openpgp.js)

/**
 * creates a binary string representation of an encrypted and signed
message.
 * The message will be encrypted with the public keys specified and signed
 * with the specified private key.
 * @param privatekey {obj: [openpgp_msg_privatekey]} private key to be used
to sign the message
 * @param publickeys [Array {obj: [openpgp_msg_publickey]}] public keys to
be used to encrypt the message
 * @param messagetext [String] message text to encrypt and sign
 * @return [String] a binary string representation of the message which can
be OpenPGP armored
 */
function write_signed_and_encrypted_message(privatekey, publickeys,
messagetext) {

the public APi calls write_signed_and_encrypted_message and
write_encrypted_message both take an array of open_msg_publickey objects.
So you can pass in an array of multiple public keys and the message can be
decrypted by any of those keys.

Make sense?

Sean

On Sat, Apr 7, 2012 at 12:53 PM, Ori <[email protected]> wrote:

> how can I do it?
>
> _______________________________________________
>
> http://openpgpjs.org
>
_______________________________________________

http://openpgpjs.org

Reply via email to