Part.openpgpEncrypt

bool openpgpEncrypt(bool sign, string userid, gmime.types.EncryptFlags flags, string[] recipients)

Encrypts (and optionally signs) the content of the mime_part and then replaces the content with the new, encrypted, content.

Parameters

signtrue if the content should also be signed; otherwise, false
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

Returns

true on success or false on error.

Throws

[ErrorWrap]