| Top |
A GMimeMultipartEncrypted part is a special subclass of GMimeMultipart to make it easier to manipulate the multipart/encrypted MIME type.
GMimeMultipartEncrypted *
g_mime_multipart_encrypted_new (void);
Creates a new MIME multipart/encrypted object.
GMimeMultipartEncrypted * g_mime_multipart_encrypted_encrypt (gpgme_ctx_t ctx,GMimeEntity *entity,gboolean sign,gpgme_encrypt_flags_t flags,gpgme_key_t *recipients,gpgme_key_t *hidden_recipients,gpgme_encrypt_result_t *encrypt_result,gpgme_sign_result_t *sign_result,GError **err);
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.
Hidden recipients receive the same content without exposing their key IDs.
See g_mime_gpgme_encrypt() for recipient-array and encryption-flag semantics.
[skip]
ctx |
a borrowed GPGME OpenPGP context |
|
entity |
MIME part to encrypt |
|
sign |
|
|
flags |
native GPGME encryption flags |
|
recipients |
borrowed NULL-terminated recipient keys. |
[nullable] |
hidden_recipients |
borrowed NULL-terminated hidden recipient keys. |
[nullable] |
encrypt_result |
a retained encryption result. |
[out][optional] |
sign_result |
a retained signing result. |
[out][optional] |
err |
a GError |
a new GMimeMultipartEncrypted 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.
GMimeEntity * g_mime_multipart_encrypted_decrypt (GMimeMultipartEncrypted *encrypted,gpgme_ctx_t ctx,gpgme_decrypt_result_t *decrypt_result,gpgme_verify_result_t *verify_result,GError **err);
Attempts to decrypt the encrypted MIME part contained within the
multipart/encrypted object encrypted
. Only surrounding ASCII linear
whitespace is removed from the protocol parameter.
Embedded signatures are verified. Configure session-key and network policies
on ctx
directly. Returned native results must be released even if parsing
the decrypted MIME entity fails. Decryption alone does not authenticate it.
[skip]