GMime.MultipartEncrypted

g GMime.Multipart GMime.Multipart GMime.MultipartEncrypted GMime.MultipartEncrypted GMime.Multipart->GMime.MultipartEncrypted GMime.Object GMime.Object GMime.Object->GMime.Multipart GObject.Object GObject.Object GObject.Object->GMime.Object

Subclasses:

None

Methods

Inherited:

GMime.Multipart (20), GMime.Object (29), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

encrypt (ctx, entity, sign, userid, flags, recipients)

class

new ()

decrypt (flags, session_key)

Virtual Methods

Inherited:

GMime.Multipart (11), GMime.Object (8), GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_object

GMime.Multipart

r

parent GMime.Multipart

Class Details

class GMime.MultipartEncrypted(**kwargs)
Bases:

GMime.Multipart

Abstract:

No

Structure:

GMime.MultipartEncryptedClass

A multipart/encrypted MIME part.

classmethod encrypt(ctx, entity, sign, userid, flags, recipients)
Parameters:
Raises:

GLib.Error

Returns:

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

Return type:

GMime.MultipartEncrypted or None

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.

classmethod new()
Returns:

an empty MIME multipart/encrypted object.

Return type:

GMime.MultipartEncrypted

Creates a new MIME multipart/encrypted object.

decrypt(flags, session_key)
Parameters:
Raises:

GLib.Error

Returns:

the decrypted MIME part on success or None on fail. If the decryption fails, an exception will be set on err to provide information as to why the failure occurred.

result:

a GMime.DecryptResult

Return type:

(GMime.Object or None, result: GMime.DecryptResult)

Attempts to decrypt the encrypted MIME part contained within the multipart/encrypted object self.

When non-None, session_key should be a None-terminated string, such as the one returned by GMime.DecryptResult.get_session_key() from a previous decryption. If the session_key is not valid, decryption will fail.

If result is non-None, then on a successful decrypt operation, it will be updated to point to a newly-allocated GMime.DecryptResult with signature status information as well as a list of recipients that the part was encrypted to.