![]() |
![]() |
![]() |
GMime 2.6 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
struct GMimeMultipartEncrypted; GMimeMultipartEncrypted * g_mime_multipart_encrypted_new (void
); int g_mime_multipart_encrypted_encrypt (GMimeMultipartEncrypted *mpe
,GMimeObject *content
,GMimeCryptoContext *ctx
,gboolean sign
,const char *userid
,GMimeDigestAlgo digest
,GPtrArray *recipients
,GError **err
); GMimeObject * g_mime_multipart_encrypted_decrypt (GMimeMultipartEncrypted *mpe
,GMimeCryptoContext *ctx
,GMimeDecryptResult **result
,GError **err
);
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.
Returns : |
an empty MIME multipart/encrypted object. |
int g_mime_multipart_encrypted_encrypt (GMimeMultipartEncrypted *mpe
,GMimeObject *content
,GMimeCryptoContext *ctx
,gboolean sign
,const char *userid
,GMimeDigestAlgo digest
,GPtrArray *recipients
,GError **err
);
Attempts to encrypt (and conditionally sign) the content
MIME part
to the public keys of recipients
using the ctx
encryption
context. If successful, the encrypted GMimeObject is set as the
encrypted part of the multipart/encrypted object mpe
.
|
multipart/encrypted object |
|
MIME part to encrypt |
|
encryption context |
|
TRUE if the content should also be signed or FALSE otherwise |
|
user id to use for signing (only used if sign is TRUE ) |
|
digest algorithm to use when signing |
|
an array of recipients to encrypt to |
|
a GError |
Returns : |
0 on success or -1 on fail. If the encryption fails, an
exception will be set on err to provide information as to why the
failure occured. |
GMimeObject * g_mime_multipart_encrypted_decrypt (GMimeMultipartEncrypted *mpe
,GMimeCryptoContext *ctx
,GMimeDecryptResult **result
,GError **err
);
Attempts to decrypt the encrypted MIME part contained within the
multipart/encrypted object mpe
using the ctx
decryption context.
If result
is non-NULL
, then on a successful decrypt operation, it will be
updated to point to a newly-allocated GMimeDecryptResult with signature
status information as well as a list of recipients that the part was
encrypted to.
|
multipart/encrypted object |
|
decryption context |
|
a GMimeDecryptionResult |
|
a GError |
Returns : |
the decrypted MIME part on success or NULL on fail. If the
decryption fails, an exception will be set on err to provide
information as to why the failure occured. |