0 on success or %-1 on fail.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
sign | sign as well as encrypt |
userid | the key id (or email address) to use when signing (assuming sign is true) |
flags | a set of #GMimeEncryptFlags |
recipients | an array of recipient key ids and/or email addresses |
istream | cleartext input stream |
ostream | ciphertext output stream |
Returns
Throws
[ErrorWrap]