gmime-multipart-encrypted

Name

gmime-multipart-encrypted -- 

Synopsis



struct      GMimeMultipartEncrypted;
GMimeMultipartEncrypted* g_mime_multipart_encrypted_new
                                            (void);
int         g_mime_multipart_encrypted_encrypt
                                            (GMimeMultipartEncrypted *mpe,
                                             GMimeObject *content,
                                             GMimeCipherContext *ctx,
                                             GPtrArray *recipients,
                                             GMimeException *ex);
GMimeObject* g_mime_multipart_encrypted_decrypt
                                            (GMimeMultipartEncrypted *mpe,
                                             GMimeCipherContext *ctx,
                                             GMimeException *ex);


Description

Details

struct GMimeMultipartEncrypted

struct GMimeMultipartEncrypted {
	GMimeMultipart parent_object;
	
	char *protocol;
	
	GMimeObject *decrypted;
};


g_mime_multipart_encrypted_new ()

GMimeMultipartEncrypted* g_mime_multipart_encrypted_new
                                            (void);

Creates a new MIME multipart/encrypted object.

Returns :an empty MIME multipart/encrypted object.


g_mime_multipart_encrypted_encrypt ()

int         g_mime_multipart_encrypted_encrypt
                                            (GMimeMultipartEncrypted *mpe,
                                             GMimeObject *content,
                                             GMimeCipherContext *ctx,
                                             GPtrArray *recipients,
                                             GMimeException *ex);

Attempts to encrypt 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.

mpe : multipart/encrypted object
content : MIME part to encrypt
ctx : encryption cipher context
recipients : an array of recipients to encrypt to
ex : exception
Returns :0 on success or -1 on fail. If the encryption fails, an exception will be set on ex to provide information as to why the failure occured.


g_mime_multipart_encrypted_decrypt ()

GMimeObject* g_mime_multipart_encrypted_decrypt
                                            (GMimeMultipartEncrypted *mpe,
                                             GMimeCipherContext *ctx,
                                             GMimeException *ex);

Attempts to decrypt the encrypted MIME part contained within the multipart/encrypted object mpe using the ctx decryption context.

mpe : multipart/encrypted object
ctx : decryption cipher context
ex : exception
Returns :the decrypted MIME part on success or NULL on fail. If the decryption fails, an exception will be set on ex to provide information as to why the failure occured.