Trait gmime::MultipartEncryptedExt[][src]

pub trait MultipartEncryptedExt {
    fn decrypt(
        &self,
        flags: DecryptFlags,
        session_key: &str
    ) -> Result<(Option<Object>, DecryptResult), Error>; }

Trait containing all MultipartEncrypted methods.

Implementors

MultipartEncrypted

Required Methods

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 DecryptResultExt::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 DecryptResult with signature status information as well as a list of recipients that the part was encrypted to.

flags

a DecryptFlags

session_key

session key to use or None

result

a DecryptResult

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.

Implementors