CryptoContext.encrypt

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

Parameters

sign bool

sign as well as encrypt

userid string

the key id (or email address) to use when signing (assuming sign is true)

flags gmime.types.EncryptFlags

a set of #GMimeEncryptFlags

recipients string[]

an array of recipient key ids and/or email addresses

istream gmime.stream.Stream

cleartext input stream

ostream gmime.stream.Stream

ciphertext output stream

Return Value

Type: int

0 on success or %-1 on fail.

Throws