ApplicationPkcs7Mime.encrypt

Attempts to encrypt the entity MIME part to the public keys of recipients using S/MIME. If successful, a new application/pkcs7-mime object is returned.

Parameters

entity gmime.object.ObjectWrap

a #GMimeObject to encrypt

flags gmime.types.EncryptFlags

a #GMimeEncryptFlags

recipients string[]

an array of recipients to encrypt to

Return Value

Type: gmime.application_pkcs7_mime.ApplicationPkcs7Mime

a new #GMimeApplicationPkcs7Mime object on success or null on fail. If encrypting fails, an exception will be set on err to provide information as to why the failure occurred.

Throws