or null on fail. If encrypting fails, an exception will be set on err to provide information as to why the failure occurred.
MultipartEncrypted.encrypt
gmime.multipart_encrypted.MultipartEncrypted encrypt(gmime.crypto_context.CryptoContext ctx, gmime.object.ObjectWrap entity, bool sign, string userid, gmime.types.EncryptFlags flags, string[] recipients)Attempts to encrypt (and conditionally sign) the entity MIME part to the public keys of recipients using the ctx encryption context. If successful, a new multipart/encrypted object is returned.
Parameters
ctx | a #GMimeCryptoContext |
entity | MIME part to encrypt |
sign | true if the content should also be signed or false otherwise |
userid | user id to use for signing (only used if sign is true) |
flags | a #GMimeEncryptFlags |
recipients | an array of recipients to encrypt to |
Returns
a new #GMimeMultipartEncrypted object on success
Throws
[ErrorWrap]