<refentry id="GMimeCryptoContext">
<refmeta>
<refentrytitle role="top_of_page" id="GMimeCryptoContext.top_of_page">GMimeCryptoContext</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GMIME Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GMimeCryptoContext</refname>
<refpurpose>Encryption/signing contexts</refpurpose>
</refnamediv>

<refsynopsisdiv id="GMimeCryptoContext.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            (<link linkend="GMimePasswordRequestFunc">*GMimePasswordRequestFunc</link>)         (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *user_id</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *prompt_ctx</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> reprompt</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *response</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);
                    <link linkend="GMimeCryptoContext-struct">GMimeCryptoContext</link>;
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-crypto-context-set-request-password">g_mime_crypto_context_set_request_password</link>
                                                        (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimePasswordRequestFunc"><type>GMimePasswordRequestFunc</type></link> request_passwd</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-crypto-context-get-signature-protocol">g_mime_crypto_context_get_signature_protocol</link>
                                                        (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-crypto-context-get-encryption-protocol">g_mime_crypto_context_get_encryption_protocol</link>
                                                        (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-crypto-context-get-key-exchange-protocol">g_mime_crypto_context_get_key_exchange_protocol</link>
                                                        (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>);
<link linkend="GMimeDigestAlgo"><returnvalue>GMimeDigestAlgo</returnvalue></link>     <link linkend="g-mime-crypto-context-digest-id">g_mime_crypto_context_digest_id</link>     (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *name</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-crypto-context-digest-name">g_mime_crypto_context_digest_name</link>   (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link> digest</parameter>);
<link linkend="int"><returnvalue>int</returnvalue></link>                 <link linkend="g-mime-crypto-context-sign">g_mime_crypto_context_sign</link>          (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *userid</parameter>,
                                                         <parameter><link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link> digest</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *istream</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *ostream</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);
<link linkend="GMimeSignatureList"><returnvalue>GMimeSignatureList</returnvalue></link> * <link linkend="g-mime-crypto-context-verify">g_mime_crypto_context_verify</link>       (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link> digest</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *istream</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *sigstream</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);
<link linkend="int"><returnvalue>int</returnvalue></link>                 <link linkend="g-mime-crypto-context-encrypt">g_mime_crypto_context_encrypt</link>       (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> sign</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *userid</parameter>,
                                                         <parameter><link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link> digest</parameter>,
                                                         <parameter><link linkend="GPtrArray"><type>GPtrArray</type></link> *recipients</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *istream</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *ostream</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);
<link linkend="GMimeDecryptResult"><returnvalue>GMimeDecryptResult</returnvalue></link> * <link linkend="g-mime-crypto-context-decrypt">g_mime_crypto_context_decrypt</link>      (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *istream</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *ostream</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);
<link linkend="int"><returnvalue>int</returnvalue></link>                 <link linkend="g-mime-crypto-context-import-keys">g_mime_crypto_context_import_keys</link>   (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *istream</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);
<link linkend="int"><returnvalue>int</returnvalue></link>                 <link linkend="g-mime-crypto-context-export-keys">g_mime_crypto_context_export_keys</link>   (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GPtrArray"><type>GPtrArray</type></link> *keys</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *ostream</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);

enum                <link linkend="GMimeCipherAlgo">GMimeCipherAlgo</link>;
                    <link linkend="GMimeDecryptResult">GMimeDecryptResult</link>;
<link linkend="GMimeDecryptResult"><returnvalue>GMimeDecryptResult</returnvalue></link> * <link linkend="g-mime-decrypt-result-new">g_mime_decrypt_result_new</link>          (<parameter><type>void</type></parameter>);
<link linkend="GMimeCertificateList"><returnvalue>GMimeCertificateList</returnvalue></link> * <link linkend="g-mime-decrypt-result-get-recipients">g_mime_decrypt_result_get_recipients</link>
                                                        (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-decrypt-result-set-recipients">g_mime_decrypt_result_set_recipients</link>
                                                        (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>,
                                                         <parameter><link linkend="GMimeCertificateList"><type>GMimeCertificateList</type></link> *recipients</parameter>);
<link linkend="GMimeSignatureList"><returnvalue>GMimeSignatureList</returnvalue></link> * <link linkend="g-mime-decrypt-result-get-signatures">g_mime_decrypt_result_get_signatures</link>
                                                        (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-decrypt-result-set-signatures">g_mime_decrypt_result_set_signatures</link>
                                                        (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>,
                                                         <parameter><link linkend="GMimeSignatureList"><type>GMimeSignatureList</type></link> *signatures</parameter>);
<link linkend="GMimeCipherAlgo"><returnvalue>GMimeCipherAlgo</returnvalue></link>     <link linkend="g-mime-decrypt-result-get-cipher">g_mime_decrypt_result_get_cipher</link>    (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-decrypt-result-set-cipher">g_mime_decrypt_result_set_cipher</link>    (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>,
                                                         <parameter><link linkend="GMimeCipherAlgo"><type>GMimeCipherAlgo</type></link> cipher</parameter>);
<link linkend="GMimeDigestAlgo"><returnvalue>GMimeDigestAlgo</returnvalue></link>     <link linkend="g-mime-decrypt-result-get-mdc">g_mime_decrypt_result_get_mdc</link>       (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-decrypt-result-set-mdc">g_mime_decrypt_result_set_mdc</link>       (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>,
                                                         <parameter><link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link> mdc</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GMimeCryptoContext.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----GMimeCryptoContext
         +----<link linkend="GMimeGpgContext">GMimeGpgContext</link>
         +----<link linkend="GMimePkcs7Context">GMimePkcs7Context</link>
</synopsis>
</refsect1>

<refsect1 id="GMimeCryptoContext.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> is used for encrypting, decrypting, signing
and verifying cryptographic signatures.
</para>
</refsect1>
<refsect1 id="GMimeCryptoContext.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMimePasswordRequestFunc" role="function">
<title>GMimePasswordRequestFunc ()</title>
<indexterm zone="GMimePasswordRequestFunc"><primary>GMimePasswordRequestFunc</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            (*GMimePasswordRequestFunc)         (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *user_id</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *prompt_ctx</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> reprompt</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *response</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);</programlisting>
<para>
A password request callback allowing a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> to
prompt the user for a password for a given key.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>the <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> making the request
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_id</parameter>&#160;:</term>
<listitem><simpara>the user_id of the password being requested
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>prompt_ctx</parameter>&#160;:</term>
<listitem><simpara>a string containing some helpful context for the prompt
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>reprompt</parameter>&#160;:</term>
<listitem><simpara><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if this password request is a reprompt due to a previously bad password response
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>response</parameter>&#160;:</term>
<listitem><simpara>a stream for the application to write the password to (followed by a newline '\n' character)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>err</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GError"><type>GError</type></link> for the callback to set if an error occurs
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success or <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> on error.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GMimeCryptoContext-struct" role="struct">
<title>GMimeCryptoContext</title>
<indexterm zone="GMimeCryptoContext-struct"><primary>GMimeCryptoContext</primary></indexterm>
<programlisting>typedef struct _GMimeCryptoContext GMimeCryptoContext;</programlisting>
<para>
A crypto context for use with MIME.
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="g-mime-crypto-context-set-request-password" role="function">
<title>g_mime_crypto_context_set_request_password ()</title>
<indexterm zone="g-mime-crypto-context-set-request-password"><primary>g_mime_crypto_context_set_request_password</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_crypto_context_set_request_password
                                                        (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimePasswordRequestFunc"><type>GMimePasswordRequestFunc</type></link> request_passwd</parameter>);</programlisting>
<para>
Sets the function used by the <parameter>ctx</parameter> for requesting a password from
the user.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>request_passwd</parameter>&#160;:</term>
<listitem><simpara>a callback function for requesting a password
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-crypto-context-get-signature-protocol" role="function">
<title>g_mime_crypto_context_get_signature_protocol ()</title>
<indexterm zone="g-mime-crypto-context-get-signature-protocol"><primary>g_mime_crypto_context_get_signature_protocol</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_crypto_context_get_signature_protocol
                                                        (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>);</programlisting>
<para>
Gets the signature protocol for the crypto context.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the signature protocol or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if not supported.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-crypto-context-get-encryption-protocol" role="function">
<title>g_mime_crypto_context_get_encryption_protocol ()</title>
<indexterm zone="g-mime-crypto-context-get-encryption-protocol"><primary>g_mime_crypto_context_get_encryption_protocol</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_crypto_context_get_encryption_protocol
                                                        (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>);</programlisting>
<para>
Gets the encryption protocol for the crypto context.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the encryption protocol or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if not supported.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-crypto-context-get-key-exchange-protocol" role="function">
<title>g_mime_crypto_context_get_key_exchange_protocol ()</title>
<indexterm zone="g-mime-crypto-context-get-key-exchange-protocol"><primary>g_mime_crypto_context_get_key_exchange_protocol</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_crypto_context_get_key_exchange_protocol
                                                        (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>);</programlisting>
<para>
Gets the key exchange protocol for the crypto context.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the key exchange protocol or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if not supported.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-crypto-context-digest-id" role="function">
<title>g_mime_crypto_context_digest_id ()</title>
<indexterm zone="g-mime-crypto-context-digest-id"><primary>g_mime_crypto_context_digest_id</primary></indexterm>
<programlisting><link linkend="GMimeDigestAlgo"><returnvalue>GMimeDigestAlgo</returnvalue></link>     g_mime_crypto_context_digest_id     (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *name</parameter>);</programlisting>
<para>
Gets the digest id based on the digest name.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara>digest name
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the equivalent digest id or <link linkend="GMIME-DIGEST-ALGO-DEFAULT:CAPS"><type>GMIME_DIGEST_ALGO_DEFAULT</type></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-crypto-context-digest-name" role="function">
<title>g_mime_crypto_context_digest_name ()</title>
<indexterm zone="g-mime-crypto-context-digest-name"><primary>g_mime_crypto_context_digest_name</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_crypto_context_digest_name   (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link> digest</parameter>);</programlisting>
<para>
Gets the digest name based on the digest id <parameter>digest</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>digest</parameter>&#160;:</term>
<listitem><simpara>digest id
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the equivalent digest name or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-crypto-context-sign" role="function">
<title>g_mime_crypto_context_sign ()</title>
<indexterm zone="g-mime-crypto-context-sign"><primary>g_mime_crypto_context_sign</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_crypto_context_sign          (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *userid</parameter>,
                                                         <parameter><link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link> digest</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *istream</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *ostream</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);</programlisting>
<para>
Signs the input stream and writes the resulting signature to the output stream.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>userid</parameter>&#160;:</term>
<listitem><simpara>private key to use to sign the stream
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>digest</parameter>&#160;:</term>
<listitem><simpara>digest algorithm to use
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>istream</parameter>&#160;:</term>
<listitem><simpara>input stream
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ostream</parameter>&#160;:</term>
<listitem><simpara>output stream
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>err</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GError"><type>GError</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link> used on success (useful if <parameter>digest</parameter> is
specified as <link linkend="GMIME-DIGEST-ALGO-DEFAULT:CAPS"><type>GMIME_DIGEST_ALGO_DEFAULT</type></link>) or <link linkend="1:CAPS"><literal>-1</literal></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-crypto-context-verify" role="function">
<title>g_mime_crypto_context_verify ()</title>
<indexterm zone="g-mime-crypto-context-verify"><primary>g_mime_crypto_context_verify</primary></indexterm>
<programlisting><link linkend="GMimeSignatureList"><returnvalue>GMimeSignatureList</returnvalue></link> * g_mime_crypto_context_verify       (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link> digest</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *istream</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *sigstream</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);</programlisting>
<para>
Verifies the signature. If <parameter>istream</parameter> is a clearsigned stream,
you should pass <link linkend="NULL:CAPS"><literal>NULL</literal></link> as the sigstream parameter. Otherwise
<parameter>sigstream</parameter> is assumed to be the signature stream and is used to
verify the integirity of the <parameter>istream</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>digest</parameter>&#160;:</term>
<listitem><simpara>digest algorithm used, if known
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>istream</parameter>&#160;:</term>
<listitem><simpara>input stream
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sigstream</parameter>&#160;:</term>
<listitem><simpara>optional detached-signature stream
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>err</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GError"><type>GError</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GMimeSignatureList"><type>GMimeSignatureList</type></link> object containing the status of each
signature.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-crypto-context-encrypt" role="function">
<title>g_mime_crypto_context_encrypt ()</title>
<indexterm zone="g-mime-crypto-context-encrypt"><primary>g_mime_crypto_context_encrypt</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_crypto_context_encrypt       (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> sign</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *userid</parameter>,
                                                         <parameter><link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link> digest</parameter>,
                                                         <parameter><link linkend="GPtrArray"><type>GPtrArray</type></link> *recipients</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *istream</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *ostream</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);</programlisting>
<para>
Encrypts (and optionally signs) the cleartext input stream and
writes the resulting ciphertext to the output stream.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>sign</parameter>&#160;:</term>
<listitem><simpara>sign as well as encrypt
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>userid</parameter>&#160;:</term>
<listitem><simpara>key id (or email address) to use when signing (assuming <parameter>sign</parameter> is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>digest</parameter>&#160;:</term>
<listitem><simpara>digest algorithm to use when signing
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>recipients</parameter>&#160;:</term>
<listitem><simpara>an array of recipient key ids and/or email addresses
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>istream</parameter>&#160;:</term>
<listitem><simpara>cleartext input stream
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ostream</parameter>&#160;:</term>
<listitem><simpara>ciphertext output stream
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>err</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GError"><type>GError</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="0:CAPS"><literal>0</literal></link> on success or <link linkend="1:CAPS"><literal>-1</literal></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-crypto-context-decrypt" role="function">
<title>g_mime_crypto_context_decrypt ()</title>
<indexterm zone="g-mime-crypto-context-decrypt"><primary>g_mime_crypto_context_decrypt</primary></indexterm>
<programlisting><link linkend="GMimeDecryptResult"><returnvalue>GMimeDecryptResult</returnvalue></link> * g_mime_crypto_context_decrypt      (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *istream</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *ostream</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);</programlisting>
<para>
Decrypts the ciphertext input stream and writes the resulting
cleartext to the output stream.
</para>
<para>
If the encrypted input stream was also signed, the returned
<link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> will have a non-<link linkend="NULL:CAPS"><literal>NULL</literal></link> list of signatures, each with a
<link linkend="GMimeSignatureStatus"><type>GMimeSignatureStatus</type></link> (among other details about each signature).
</para>
<para>
On success, the returned <link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> will contain a list of
certificates, one for each recipient, that the original encrypted stream
was encrypted to.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>istream</parameter>&#160;:</term>
<listitem><simpara>input/ciphertext stream
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ostream</parameter>&#160;:</term>
<listitem><simpara>output/cleartext stream
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>err</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GError"><type>GError</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> on success or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on error.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-crypto-context-import-keys" role="function">
<title>g_mime_crypto_context_import_keys ()</title>
<indexterm zone="g-mime-crypto-context-import-keys"><primary>g_mime_crypto_context_import_keys</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_crypto_context_import_keys   (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *istream</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);</programlisting>
<para>
Imports a stream of keys/certificates contained within <parameter>istream</parameter>
into the key/certificate database controlled by <parameter>ctx</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>istream</parameter>&#160;:</term>
<listitem><simpara>input stream (containing keys)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>err</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GError"><type>GError</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="0:CAPS"><literal>0</literal></link> on success or <link linkend="1:CAPS"><literal>-1</literal></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-crypto-context-export-keys" role="function">
<title>g_mime_crypto_context_export_keys ()</title>
<indexterm zone="g-mime-crypto-context-export-keys"><primary>g_mime_crypto_context_export_keys</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_crypto_context_export_keys   (<parameter><link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GPtrArray"><type>GPtrArray</type></link> *keys</parameter>,
                                                         <parameter><link linkend="GMimeStream"><type>GMimeStream</type></link> *ostream</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **err</parameter>);</programlisting>
<para>
Exports the keys/certificates in <parameter>keys</parameter> to the stream <parameter>ostream</parameter> from
the key/certificate database controlled by <parameter>ctx</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>keys</parameter>&#160;:</term>
<listitem><simpara>an array of key ids
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ostream</parameter>&#160;:</term>
<listitem><simpara>output stream
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>err</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GError"><type>GError</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="0:CAPS"><literal>0</literal></link> on success or <link linkend="1:CAPS"><literal>-1</literal></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GMimeCipherAlgo" role="enum">
<title>enum GMimeCipherAlgo</title>
<indexterm zone="GMimeCipherAlgo"><primary>GMimeCipherAlgo</primary></indexterm>
<programlisting>typedef enum {
	GMIME_CIPHER_ALGO_DEFAULT     = 0,
	GMIME_CIPHER_ALGO_IDEA        = 1,
	GMIME_CIPHER_ALGO_3DES        = 2,
	GMIME_CIPHER_ALGO_CAST5       = 3,
	GMIME_CIPHER_ALGO_BLOWFISH    = 4,
	GMIME_CIPHER_ALGO_AES         = 7,
	GMIME_CIPHER_ALGO_AES192      = 8,
	GMIME_CIPHER_ALGO_AES256      = 9,
	GMIME_CIPHER_ALGO_TWOFISH     = 10,
	GMIME_CIPHER_ALGO_CAMELLIA128 = 11,
	GMIME_CIPHER_ALGO_CAMELLIA192 = 12,
	GMIME_CIPHER_ALGO_CAMELLIA256 = 13
} GMimeCipherAlgo;
</programlisting>
<para>
A cipher algorithm.
</para><variablelist role="enum">
<varlistentry id="GMIME-CIPHER-ALGO-DEFAULT:CAPS" role="constant">
<term><literal>GMIME_CIPHER_ALGO_DEFAULT</literal></term>
<listitem><simpara>The default (or unknown) cipher.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-ALGO-IDEA:CAPS" role="constant">
<term><literal>GMIME_CIPHER_ALGO_IDEA</literal></term>
<listitem><simpara>The IDEA cipher.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-ALGO-3DES:CAPS" role="constant">
<term><literal>GMIME_CIPHER_ALGO_3DES</literal></term>
<listitem><simpara>The 3DES cipher.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-ALGO-CAST5:CAPS" role="constant">
<term><literal>GMIME_CIPHER_ALGO_CAST5</literal></term>
<listitem><simpara>The CAST5 cipher.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-ALGO-BLOWFISH:CAPS" role="constant">
<term><literal>GMIME_CIPHER_ALGO_BLOWFISH</literal></term>
<listitem><simpara>The Blowfish cipher.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-ALGO-AES:CAPS" role="constant">
<term><literal>GMIME_CIPHER_ALGO_AES</literal></term>
<listitem><simpara>The AES (aka RIJANDALE) cipher.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-ALGO-AES192:CAPS" role="constant">
<term><literal>GMIME_CIPHER_ALGO_AES192</literal></term>
<listitem><simpara>The AES-192 cipher.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-ALGO-AES256:CAPS" role="constant">
<term><literal>GMIME_CIPHER_ALGO_AES256</literal></term>
<listitem><simpara>The AES-256 cipher.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-ALGO-TWOFISH:CAPS" role="constant">
<term><literal>GMIME_CIPHER_ALGO_TWOFISH</literal></term>
<listitem><simpara>The Twofish cipher.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-ALGO-CAMELLIA128:CAPS" role="constant">
<term><literal>GMIME_CIPHER_ALGO_CAMELLIA128</literal></term>
<listitem><simpara>The Camellia-128 cipher.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-ALGO-CAMELLIA192:CAPS" role="constant">
<term><literal>GMIME_CIPHER_ALGO_CAMELLIA192</literal></term>
<listitem><simpara>The Camellia-192 cipher.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-ALGO-CAMELLIA256:CAPS" role="constant">
<term><literal>GMIME_CIPHER_ALGO_CAMELLIA256</literal></term>
<listitem><simpara>The Camellia-256 cipher.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GMimeDecryptResult" role="struct">
<title>GMimeDecryptResult</title>
<indexterm zone="GMimeDecryptResult"><primary>GMimeDecryptResult</primary></indexterm>
<programlisting>typedef struct {
	GObject parent_object;
	
	GMimeCertificateList *recipients;
	GMimeSignatureList *signatures;
	GMimeCipherAlgo cipher;
	GMimeDigestAlgo mdc;
} GMimeDecryptResult;
</programlisting>
<para>
An object containing the results from decrypting an encrypted stream.
</para><variablelist role="struct">
<varlistentry><term><link linkend="GObject"><type>GObject</type></link>&#160;<structfield id="GMimeDecryptResult.parent-object">parent_object</structfield>;</term>
<listitem><simpara>parent <link linkend="GObject"><type>GObject</type></link>
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="GMimeCertificateList"><type>GMimeCertificateList</type></link>&#160;*<structfield id="GMimeDecryptResult.recipients">recipients</structfield>;</term>
<listitem><simpara>A <link linkend="GMimeCertificateList"><type>GMimeCertificateList</type></link>
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="GMimeSignatureList"><type>GMimeSignatureList</type></link>&#160;*<structfield id="GMimeDecryptResult.signatures">signatures</structfield>;</term>
<listitem><simpara>A <link linkend="GMimeSignatureList"><type>GMimeSignatureList</type></link> if signed or <link linkend="NULL:CAPS"><literal>NULL</literal></link> otherwise.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="GMimeCipherAlgo"><type>GMimeCipherAlgo</type></link>&#160;<structfield id="GMimeDecryptResult.cipher">cipher</structfield>;</term>
<listitem><simpara>The cipher algorithm used to encrypt the stream.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link>&#160;<structfield id="GMimeDecryptResult.mdc">mdc</structfield>;</term>
<listitem><simpara>The MDC digest algorithm used, if any.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-decrypt-result-new" role="function">
<title>g_mime_decrypt_result_new ()</title>
<indexterm zone="g-mime-decrypt-result-new"><primary>g_mime_decrypt_result_new</primary></indexterm>
<programlisting><link linkend="GMimeDecryptResult"><returnvalue>GMimeDecryptResult</returnvalue></link> * g_mime_decrypt_result_new          (<parameter><type>void</type></parameter>);</programlisting>
<para>
Creates a new <link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> object.
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-decrypt-result-get-recipients" role="function">
<title>g_mime_decrypt_result_get_recipients ()</title>
<indexterm zone="g-mime-decrypt-result-get-recipients"><primary>g_mime_decrypt_result_get_recipients</primary></indexterm>
<programlisting><link linkend="GMimeCertificateList"><returnvalue>GMimeCertificateList</returnvalue></link> * g_mime_decrypt_result_get_recipients
                                                        (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>);</programlisting>
<para>
Gets the list of certificates that the stream had been encrypted to.
</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GMimeCertificateList"><type>GMimeCertificateList</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-decrypt-result-set-recipients" role="function">
<title>g_mime_decrypt_result_set_recipients ()</title>
<indexterm zone="g-mime-decrypt-result-set-recipients"><primary>g_mime_decrypt_result_set_recipients</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_decrypt_result_set_recipients
                                                        (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>,
                                                         <parameter><link linkend="GMimeCertificateList"><type>GMimeCertificateList</type></link> *recipients</parameter>);</programlisting>
<para>
Sets the list of certificates that the stream had been encrypted to.
</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>recipients</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="GMimeCertificateList"><type>GMimeCertificateList</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-decrypt-result-get-signatures" role="function">
<title>g_mime_decrypt_result_get_signatures ()</title>
<indexterm zone="g-mime-decrypt-result-get-signatures"><primary>g_mime_decrypt_result_get_signatures</primary></indexterm>
<programlisting><link linkend="GMimeSignatureList"><returnvalue>GMimeSignatureList</returnvalue></link> * g_mime_decrypt_result_get_signatures
                                                        (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>);</programlisting>
<para>
Gets a list of signatures if the encrypted stream had also been signed.
</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GMimeSignatureList"><type>GMimeSignatureList</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the stream was not signed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-decrypt-result-set-signatures" role="function">
<title>g_mime_decrypt_result_set_signatures ()</title>
<indexterm zone="g-mime-decrypt-result-set-signatures"><primary>g_mime_decrypt_result_set_signatures</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_decrypt_result_set_signatures
                                                        (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>,
                                                         <parameter><link linkend="GMimeSignatureList"><type>GMimeSignatureList</type></link> *signatures</parameter>);</programlisting>
<para>
Sets the list of signatures.
</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>signatures</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="GMimeSignatureList"><type>GMimeSignatureList</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-decrypt-result-get-cipher" role="function">
<title>g_mime_decrypt_result_get_cipher ()</title>
<indexterm zone="g-mime-decrypt-result-get-cipher"><primary>g_mime_decrypt_result_get_cipher</primary></indexterm>
<programlisting><link linkend="GMimeCipherAlgo"><returnvalue>GMimeCipherAlgo</returnvalue></link>     g_mime_decrypt_result_get_cipher    (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>);</programlisting>
<para>
Get the cipher algorithm used.
</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the cipher algorithm used.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-decrypt-result-set-cipher" role="function">
<title>g_mime_decrypt_result_set_cipher ()</title>
<indexterm zone="g-mime-decrypt-result-set-cipher"><primary>g_mime_decrypt_result_set_cipher</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_decrypt_result_set_cipher    (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>,
                                                         <parameter><link linkend="GMimeCipherAlgo"><type>GMimeCipherAlgo</type></link> cipher</parameter>);</programlisting>
<para>
Set the cipher algorithm used.
</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cipher</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCipherAlgo"><type>GMimeCipherAlgo</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-decrypt-result-get-mdc" role="function">
<title>g_mime_decrypt_result_get_mdc ()</title>
<indexterm zone="g-mime-decrypt-result-get-mdc"><primary>g_mime_decrypt_result_get_mdc</primary></indexterm>
<programlisting><link linkend="GMimeDigestAlgo"><returnvalue>GMimeDigestAlgo</returnvalue></link>     g_mime_decrypt_result_get_mdc       (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>);</programlisting>
<para>
Get the mdc digest algorithm used.
</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the mdc digest algorithm used.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-decrypt-result-set-mdc" role="function">
<title>g_mime_decrypt_result_set_mdc ()</title>
<indexterm zone="g-mime-decrypt-result-set-mdc"><primary>g_mime_decrypt_result_set_mdc</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_decrypt_result_set_mdc       (<parameter><link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link> *result</parameter>,
                                                         <parameter><link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link> mdc</parameter>);</programlisting>
<para>
Set the mdc digest algorithm used.
</para><variablelist role="params">
<varlistentry><term><parameter>result</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeDecryptResult"><type>GMimeDecryptResult</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mdc</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeDigestAlgo"><type>GMimeDigestAlgo</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

</refentry>
