CryptoContext.encrypt

int encrypt(bool sign, string userid, gmime.types.EncryptFlags flags, string[] recipients, gmime.stream.Stream istream, gmime.stream.Stream ostream)

Encrypts (and optionally signs) the cleartext input stream and writes the resulting ciphertext to the output stream.

Parameters

signsign as well as encrypt
useridthe key id (or email address) to use when signing (assuming sign is true)
flagsa set of #GMimeEncryptFlags
recipientsan array of recipient key ids and/or email addresses
istreamcleartext input stream
ostreamciphertext output stream

Returns

0 on success or %-1 on fail.

Throws

[ErrorWrap]