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

<refsynopsisdiv id="GMimeCipherContext.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="GMimeCipherContext"><type>GMimeCipherContext</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>);
enum                <link linkend="GMimeCipherHash">GMimeCipherHash</link>;
                    <link linkend="GMimeCipherContext-struct">GMimeCipherContext</link>;
                    <link linkend="GMimeSignatureValidity">GMimeSignatureValidity</link>;
enum                <link linkend="GMimeSignatureStatus">GMimeSignatureStatus</link>;
enum                <link linkend="GMimeSignerStatus">GMimeSignerStatus</link>;
enum                <link linkend="GMimeSignerTrust">GMimeSignerTrust</link>;
enum                <link linkend="GMimeSignerError">GMimeSignerError</link>;
                    <link linkend="GMimeSigner">GMimeSigner</link>;
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-cipher-context-set-request-password">g_mime_cipher_context_set_request_password</link>
                                                        (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimePasswordRequestFunc"><type>GMimePasswordRequestFunc</type></link> request_passwd</parameter>);
<link linkend="GMimeCipherHash"><returnvalue>GMimeCipherHash</returnvalue></link>     <link linkend="g-mime-cipher-context-hash-id">g_mime_cipher_context_hash_id</link>       (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</type></link> *ctx</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *hash</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-cipher-context-hash-name">g_mime_cipher_context_hash_name</link>     (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimeCipherHash"><type>GMimeCipherHash</type></link> hash</parameter>);
<link linkend="int"><returnvalue>int</returnvalue></link>                 <link linkend="g-mime-cipher-context-sign">g_mime_cipher_context_sign</link>          (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</type></link> *ctx</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *userid</parameter>,
                                                         <parameter><link linkend="GMimeCipherHash"><type>GMimeCipherHash</type></link> hash</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="GMimeSignatureValidity"><returnvalue>GMimeSignatureValidity</returnvalue></link> * <link linkend="g-mime-cipher-context-verify">g_mime_cipher_context_verify</link>   (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimeCipherHash"><type>GMimeCipherHash</type></link> hash</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-cipher-context-encrypt">g_mime_cipher_context_encrypt</link>       (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</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="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="GMimeSignatureValidity"><returnvalue>GMimeSignatureValidity</returnvalue></link> * <link linkend="g-mime-cipher-context-decrypt">g_mime_cipher_context_decrypt</link>  (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</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-cipher-context-import-keys">g_mime_cipher_context_import_keys</link>   (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</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-cipher-context-export-keys">g_mime_cipher_context_export_keys</link>   (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</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>);

<link linkend="GMimeSigner"><returnvalue>GMimeSigner</returnvalue></link> *       <link linkend="g-mime-signer-new">g_mime_signer_new</link>                   (<parameter><type>void</type></parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-free">g_mime_signer_free</link>                  (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="GMimeSigner"><returnvalue>GMimeSigner</returnvalue></link> *       <link linkend="g-mime-signer-next">g_mime_signer_next</link>                  (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="GMimeSignerStatus"><returnvalue>GMimeSignerStatus</returnvalue></link>   <link linkend="g-mime-signer-get-status">g_mime_signer_get_status</link>            (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-status">g_mime_signer_set_status</link>            (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="GMimeSignerStatus"><type>GMimeSignerStatus</type></link> status</parameter>);
<link linkend="GMimeSignerError"><returnvalue>GMimeSignerError</returnvalue></link>    <link linkend="g-mime-signer-get-errors">g_mime_signer_get_errors</link>            (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-errors">g_mime_signer_set_errors</link>            (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="GMimeSignerError"><type>GMimeSignerError</type></link> error</parameter>);
<link linkend="GMimeSignerTrust"><returnvalue>GMimeSignerTrust</returnvalue></link>    <link linkend="g-mime-signer-get-trust">g_mime_signer_get_trust</link>             (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-trust">g_mime_signer_set_trust</link>             (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="GMimeSignerTrust"><type>GMimeSignerTrust</type></link> trust</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-signer-get-issuer-serial">g_mime_signer_get_issuer_serial</link>     (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-issuer-serial">g_mime_signer_set_issuer_serial</link>     (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *issuer_serial</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-signer-get-issuer-name">g_mime_signer_get_issuer_name</link>       (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-issuer-name">g_mime_signer_set_issuer_name</link>       (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *issuer_name</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-signer-get-fingerprint">g_mime_signer_get_fingerprint</link>       (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-fingerprint">g_mime_signer_set_fingerprint</link>       (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *fingerprint</parameter>);
<link linkend="time-t"><returnvalue>time_t</returnvalue></link>              <link linkend="g-mime-signer-get-sig-created">g_mime_signer_get_sig_created</link>       (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-sig-created">g_mime_signer_set_sig_created</link>       (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="time-t"><type>time_t</type></link> created</parameter>);
<link linkend="time-t"><returnvalue>time_t</returnvalue></link>              <link linkend="g-mime-signer-get-sig-expires">g_mime_signer_get_sig_expires</link>       (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-sig-expires">g_mime_signer_set_sig_expires</link>       (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="time-t"><type>time_t</type></link> expires</parameter>);
<link linkend="time-t"><returnvalue>time_t</returnvalue></link>              <link linkend="g-mime-signer-get-key-created">g_mime_signer_get_key_created</link>       (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-key-created">g_mime_signer_set_key_created</link>       (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="time-t"><type>time_t</type></link> created</parameter>);
<link linkend="time-t"><returnvalue>time_t</returnvalue></link>              <link linkend="g-mime-signer-get-key-expires">g_mime_signer_get_key_expires</link>       (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-key-expires">g_mime_signer_set_key_expires</link>       (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="time-t"><type>time_t</type></link> expires</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-signer-get-key-id">g_mime_signer_get_key_id</link>            (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-key-id">g_mime_signer_set_key_id</link>            (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *key_id</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-signer-get-email">g_mime_signer_get_email</link>             (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-email">g_mime_signer_set_email</link>             (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *email</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-signer-get-name">g_mime_signer_get_name</link>              (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signer-set-name">g_mime_signer_set_name</link>              (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *name</parameter>);
<link linkend="GMimeSignatureValidity"><returnvalue>GMimeSignatureValidity</returnvalue></link> * <link linkend="g-mime-signature-validity-new">g_mime_signature_validity_new</link>  (<parameter><type>void</type></parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signature-validity-free">g_mime_signature_validity_free</link>      (<parameter><link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signature-validity-set-status">g_mime_signature_validity_set_status</link>
                                                        (<parameter><link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>,
                                                         <parameter><link linkend="GMimeSignatureStatus"><type>GMimeSignatureStatus</type></link> status</parameter>);
<link linkend="GMimeSignatureStatus"><returnvalue>GMimeSignatureStatus</returnvalue></link>  <link linkend="g-mime-signature-validity-get-status">g_mime_signature_validity_get_status</link>
                                                        (<parameter>const <link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signature-validity-set-details">g_mime_signature_validity_set_details</link>
                                                        (<parameter><link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *details</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-signature-validity-get-details">g_mime_signature_validity_get_details</link>
                                                        (<parameter>const <link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-signature-validity-add-signer">g_mime_signature_validity_add_signer</link>
                                                        (<parameter><link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>,
                                                         <parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);
const <link linkend="GMimeSigner"><returnvalue>GMimeSigner</returnvalue></link> * <link linkend="g-mime-signature-validity-get-signers">g_mime_signature_validity_get_signers</link>
                                                        (<parameter>const <link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GMimeCipherContext.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----GMimeCipherContext
         +----<link linkend="GMimeGpgContext">GMimeGpgContext</link>
</synopsis>
</refsect1>

<refsect1 id="GMimeCipherContext.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GMimeCipherContext"><type>GMimeCipherContext</type></link> is used for encrypting, decrypting, signing
and verifying cryptographic signatures.
</para>
</refsect1>
<refsect1 id="GMimeCipherContext.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="GMimeCipherContext"><type>GMimeCipherContext</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="GMimeCipherContext"><type>GMimeCipherContext</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="GMimeCipherContext"><type>GMimeCipherContext</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="GMimeCipherHash" role="enum">
<title>enum GMimeCipherHash</title>
<indexterm zone="GMimeCipherHash"><primary>GMimeCipherHash</primary></indexterm>
<programlisting>typedef enum {
	GMIME_CIPHER_HASH_DEFAULT,
	GMIME_CIPHER_HASH_MD2,
	GMIME_CIPHER_HASH_MD5,
	GMIME_CIPHER_HASH_SHA1,
	GMIME_CIPHER_HASH_SHA224,
	GMIME_CIPHER_HASH_SHA256,
	GMIME_CIPHER_HASH_SHA384,
	GMIME_CIPHER_HASH_SHA512,
	GMIME_CIPHER_HASH_RIPEMD160,
	GMIME_CIPHER_HASH_TIGER192,
	GMIME_CIPHER_HASH_HAVAL5160
} GMimeCipherHash;
</programlisting>
<para>
A hash algorithm.
</para><variablelist role="enum">
<varlistentry id="GMIME-CIPHER-HASH-DEFAULT:CAPS" role="constant">
<term><literal>GMIME_CIPHER_HASH_DEFAULT</literal></term>
<listitem><simpara>The default hash algorithm.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-HASH-MD2:CAPS" role="constant">
<term><literal>GMIME_CIPHER_HASH_MD2</literal></term>
<listitem><simpara>The MD2 hash algorithm.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-HASH-MD5:CAPS" role="constant">
<term><literal>GMIME_CIPHER_HASH_MD5</literal></term>
<listitem><simpara>The MD5 hash algorithm.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-HASH-SHA1:CAPS" role="constant">
<term><literal>GMIME_CIPHER_HASH_SHA1</literal></term>
<listitem><simpara>The SHA-1 hash algorithm.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-HASH-SHA224:CAPS" role="constant">
<term><literal>GMIME_CIPHER_HASH_SHA224</literal></term>
<listitem><simpara>The SHA-224 hash algorithm.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-HASH-SHA256:CAPS" role="constant">
<term><literal>GMIME_CIPHER_HASH_SHA256</literal></term>
<listitem><simpara>The SHA-256 hash algorithm.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-HASH-SHA384:CAPS" role="constant">
<term><literal>GMIME_CIPHER_HASH_SHA384</literal></term>
<listitem><simpara>The SHA-384 hash algorithm.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-HASH-SHA512:CAPS" role="constant">
<term><literal>GMIME_CIPHER_HASH_SHA512</literal></term>
<listitem><simpara>The SHA-512 hash algorithm.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-HASH-RIPEMD160:CAPS" role="constant">
<term><literal>GMIME_CIPHER_HASH_RIPEMD160</literal></term>
<listitem><simpara>The RIPEMD-160 hash algorithm.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-HASH-TIGER192:CAPS" role="constant">
<term><literal>GMIME_CIPHER_HASH_TIGER192</literal></term>
<listitem><simpara>The TIGER-192 hash algorithm.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-CIPHER-HASH-HAVAL5160:CAPS" role="constant">
<term><literal>GMIME_CIPHER_HASH_HAVAL5160</literal></term>
<listitem><simpara>The HAVAL5-160 hash algorithm.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GMimeCipherContext-struct" role="struct">
<title>GMimeCipherContext</title>
<indexterm zone="GMimeCipherContext-struct"><primary>GMimeCipherContext</primary></indexterm>
<programlisting>typedef struct _GMimeCipherContext GMimeCipherContext;</programlisting>
<para>
A crypto context for use with MIME.
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="GMimeSignatureValidity" role="struct">
<title>GMimeSignatureValidity</title>
<indexterm zone="GMimeSignatureValidity"><primary>GMimeSignatureValidity</primary></indexterm>
<programlisting>typedef struct {
	GMimeSignatureStatus status;
	GMimeSigner *signers;
	char *details;
} GMimeSignatureValidity;
</programlisting>
<para>
A structure containing information about the signature validity of
a signed stream.
</para><variablelist role="struct">
<varlistentry><term><link linkend="GMimeSignatureStatus"><type>GMimeSignatureStatus</type></link>&#160;<structfield id="GMimeSignatureValidity.status">status</structfield>;</term>
<listitem><simpara>The overall signature status.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="GMimeSigner"><type>GMimeSigner</type></link>&#160;*<structfield id="GMimeSignatureValidity.signers">signers</structfield>;</term>
<listitem><simpara>A list of <link linkend="GMimeSigner"><type>GMimeSigner</type></link> structures.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="char"><type>char</type></link>&#160;*<structfield id="GMimeSignatureValidity.details">details</structfield>;</term>
<listitem><simpara>A string containing more user-readable details.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GMimeSignatureStatus" role="enum">
<title>enum GMimeSignatureStatus</title>
<indexterm zone="GMimeSignatureStatus"><primary>GMimeSignatureStatus</primary></indexterm>
<programlisting>typedef enum {
	GMIME_SIGNATURE_STATUS_NONE,
	GMIME_SIGNATURE_STATUS_GOOD,
	GMIME_SIGNATURE_STATUS_BAD,
	GMIME_SIGNATURE_STATUS_UNKNOWN
} GMimeSignatureStatus;
</programlisting>
<para>
The status of a message signature.
</para><variablelist role="enum">
<varlistentry id="GMIME-SIGNATURE-STATUS-NONE:CAPS" role="constant">
<term><literal>GMIME_SIGNATURE_STATUS_NONE</literal></term>
<listitem><simpara>No status.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNATURE-STATUS-GOOD:CAPS" role="constant">
<term><literal>GMIME_SIGNATURE_STATUS_GOOD</literal></term>
<listitem><simpara>Good signature.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNATURE-STATUS-BAD:CAPS" role="constant">
<term><literal>GMIME_SIGNATURE_STATUS_BAD</literal></term>
<listitem><simpara>Bad signature.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNATURE-STATUS-UNKNOWN:CAPS" role="constant">
<term><literal>GMIME_SIGNATURE_STATUS_UNKNOWN</literal></term>
<listitem><simpara>Unknown signature status.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GMimeSignerStatus" role="enum">
<title>enum GMimeSignerStatus</title>
<indexterm zone="GMimeSignerStatus"><primary>GMimeSignerStatus</primary></indexterm>
<programlisting>typedef enum {
	GMIME_SIGNER_STATUS_NONE,
	GMIME_SIGNER_STATUS_GOOD,
	GMIME_SIGNER_STATUS_BAD,
	GMIME_SIGNER_STATUS_ERROR
} GMimeSignerStatus;
</programlisting>
<para>
A value representing the signature status for a particular
<link linkend="GMimeSigner"><type>GMimeSigner</type></link>.
</para><variablelist role="enum">
<varlistentry id="GMIME-SIGNER-STATUS-NONE:CAPS" role="constant">
<term><literal>GMIME_SIGNER_STATUS_NONE</literal></term>
<listitem><simpara>No status.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNER-STATUS-GOOD:CAPS" role="constant">
<term><literal>GMIME_SIGNER_STATUS_GOOD</literal></term>
<listitem><simpara>Good signature.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNER-STATUS-BAD:CAPS" role="constant">
<term><literal>GMIME_SIGNER_STATUS_BAD</literal></term>
<listitem><simpara>Bad signature.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNER-STATUS-ERROR:CAPS" role="constant">
<term><literal>GMIME_SIGNER_STATUS_ERROR</literal></term>
<listitem><simpara>An error occurred.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GMimeSignerTrust" role="enum">
<title>enum GMimeSignerTrust</title>
<indexterm zone="GMimeSignerTrust"><primary>GMimeSignerTrust</primary></indexterm>
<programlisting>typedef enum {
	GMIME_SIGNER_TRUST_NONE,
	GMIME_SIGNER_TRUST_NEVER,
	GMIME_SIGNER_TRUST_UNDEFINED,
	GMIME_SIGNER_TRUST_MARGINAL,
	GMIME_SIGNER_TRUST_FULLY,
	GMIME_SIGNER_TRUST_ULTIMATE
} GMimeSignerTrust;
</programlisting>
<para>
The trust value of a signer.
</para><variablelist role="enum">
<varlistentry id="GMIME-SIGNER-TRUST-NONE:CAPS" role="constant">
<term><literal>GMIME_SIGNER_TRUST_NONE</literal></term>
<listitem><simpara>No trust assigned.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNER-TRUST-NEVER:CAPS" role="constant">
<term><literal>GMIME_SIGNER_TRUST_NEVER</literal></term>
<listitem><simpara>Never trust this signer.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNER-TRUST-UNDEFINED:CAPS" role="constant">
<term><literal>GMIME_SIGNER_TRUST_UNDEFINED</literal></term>
<listitem><simpara>Undefined trust for this signer.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNER-TRUST-MARGINAL:CAPS" role="constant">
<term><literal>GMIME_SIGNER_TRUST_MARGINAL</literal></term>
<listitem><simpara>Trust this signer maginally.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNER-TRUST-FULLY:CAPS" role="constant">
<term><literal>GMIME_SIGNER_TRUST_FULLY</literal></term>
<listitem><simpara>Trust this signer fully.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNER-TRUST-ULTIMATE:CAPS" role="constant">
<term><literal>GMIME_SIGNER_TRUST_ULTIMATE</literal></term>
<listitem><simpara>Trust this signer ultimately.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GMimeSignerError" role="enum">
<title>enum GMimeSignerError</title>
<indexterm zone="GMimeSignerError"><primary>GMimeSignerError</primary></indexterm>
<programlisting>typedef enum {
	GMIME_SIGNER_ERROR_NONE,
	GMIME_SIGNER_ERROR_EXPSIG      = (1 &lt;&lt; 0),  /* expired signature */
	GMIME_SIGNER_ERROR_NO_PUBKEY   = (1 &lt;&lt; 1),  /* no public key */
	GMIME_SIGNER_ERROR_EXPKEYSIG   = (1 &lt;&lt; 2),  /* expired key */
	GMIME_SIGNER_ERROR_REVKEYSIG   = (1 &lt;&lt; 3)   /* revoked key */
} GMimeSignerError;
</programlisting>
<para>
Possible errors that a <link linkend="GMimeSigner"><type>GMimeSigner</type></link> could have.
</para><variablelist role="enum">
<varlistentry id="GMIME-SIGNER-ERROR-NONE:CAPS" role="constant">
<term><literal>GMIME_SIGNER_ERROR_NONE</literal></term>
<listitem><simpara>No error.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNER-ERROR-EXPSIG:CAPS" role="constant">
<term><literal>GMIME_SIGNER_ERROR_EXPSIG</literal></term>
<listitem><simpara>Expired signature.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNER-ERROR-NO-PUBKEY:CAPS" role="constant">
<term><literal>GMIME_SIGNER_ERROR_NO_PUBKEY</literal></term>
<listitem><simpara>No public key found.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNER-ERROR-EXPKEYSIG:CAPS" role="constant">
<term><literal>GMIME_SIGNER_ERROR_EXPKEYSIG</literal></term>
<listitem><simpara>Expired signature key.
</simpara></listitem>
</varlistentry>
<varlistentry id="GMIME-SIGNER-ERROR-REVKEYSIG:CAPS" role="constant">
<term><literal>GMIME_SIGNER_ERROR_REVKEYSIG</literal></term>
<listitem><simpara>Revoked signature key.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GMimeSigner" role="struct">
<title>GMimeSigner</title>
<indexterm zone="GMimeSigner"><primary>GMimeSigner</primary></indexterm>
<programlisting>typedef struct {
	GMimeSigner *next;
	unsigned int status:2;    /* GMimeSignerStatus */
	unsigned int errors:4;    /* bitfield of GMimeSignerError's */
	unsigned int trust:3;     /* GMimeSignerTrust */
	unsigned int unused:21;   /* unused expansion bits */
	char *issuer_serial;
	char *issuer_name;
	char *fingerprint;
	time_t sig_created;
	time_t sig_expires;
	time_t key_created;
	time_t key_expires;
	char *keyid;
	char *email;
	char *name;
} GMimeSigner;
</programlisting>
<para>
A structure containing useful information about a signer.
</para><variablelist role="struct">
<varlistentry><term><link linkend="GMimeSigner"><type>GMimeSigner</type></link>&#160;*<structfield id="GMimeSigner.next">next</structfield>;</term>
<listitem><simpara>Pointer to the next <link linkend="GMimeSigner"><type>GMimeSigner</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry><term>unsigned&#160;<link linkend="int"><type>int</type></link>&#160;<structfield id="GMimeSigner.status">status</structfield>&#160;:2;</term>
<listitem><simpara>A <link linkend="GMimeSignerStatus"><type>GMimeSignerStatus</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry><term>unsigned&#160;<link linkend="int"><type>int</type></link>&#160;<structfield id="GMimeSigner.errors">errors</structfield>&#160;:4;</term>
<listitem><simpara>A bitfield of <link linkend="GMimeSignerError"><type>GMimeSignerError</type></link> values.
</simpara></listitem>
</varlistentry>
<varlistentry><term>unsigned&#160;<link linkend="int"><type>int</type></link>&#160;<structfield id="GMimeSigner.trust">trust</structfield>&#160;:3;</term>
<listitem><simpara>A <link linkend="GMimeSignerTrust"><type>GMimeSignerTrust</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry><term>unsigned&#160;<link linkend="int"><type>int</type></link>&#160;<structfield id="GMimeSigner.unused">unused</structfield>&#160;:21;</term>
<listitem><simpara>Unused expansion bits for future use; ignore this.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="char"><type>char</type></link>&#160;*<structfield id="GMimeSigner.issuer-serial">issuer_serial</structfield>;</term>
<listitem><simpara>The issuer of the certificate if known.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="char"><type>char</type></link>&#160;*<structfield id="GMimeSigner.issuer-name">issuer_name</structfield>;</term>
<listitem><simpara>The issuer of the certificate if known.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="char"><type>char</type></link>&#160;*<structfield id="GMimeSigner.fingerprint">fingerprint</structfield>;</term>
<listitem><simpara>A hex string representing the signer's fingerprint.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="time-t"><type>time_t</type></link>&#160;<structfield id="GMimeSigner.sig-created">sig_created</structfield>;</term>
<listitem><simpara>The creation date of the signature.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="time-t"><type>time_t</type></link>&#160;<structfield id="GMimeSigner.sig-expires">sig_expires</structfield>;</term>
<listitem><simpara>The expiration date of the signature.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="time-t"><type>time_t</type></link>&#160;<structfield id="GMimeSigner.key-created">key_created</structfield>;</term>
<listitem><simpara>The creation date of the signature key.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="time-t"><type>time_t</type></link>&#160;<structfield id="GMimeSigner.key-expires">key_expires</structfield>;</term>
<listitem><simpara>The expiration date of the signature key.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="char"><type>char</type></link>&#160;*<structfield id="GMimeSigner.keyid">keyid</structfield>;</term>
<listitem><simpara>The signer's key id.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="char"><type>char</type></link>&#160;*<structfield id="GMimeSigner.email">email</structfield>;</term>
<listitem><simpara>The email address of the person or entity.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="char"><type>char</type></link>&#160;*<structfield id="GMimeSigner.name">name</structfield>;</term>
<listitem><simpara>The name of the person or entity.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-cipher-context-set-request-password" role="function">
<title>g_mime_cipher_context_set_request_password ()</title>
<indexterm zone="g-mime-cipher-context-set-request-password"><primary>g_mime_cipher_context_set_request_password</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_cipher_context_set_request_password
                                                        (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</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="GMimeCipherContext"><type>GMimeCipherContext</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-cipher-context-hash-id" role="function">
<title>g_mime_cipher_context_hash_id ()</title>
<indexterm zone="g-mime-cipher-context-hash-id"><primary>g_mime_cipher_context_hash_id</primary></indexterm>
<programlisting><link linkend="GMimeCipherHash"><returnvalue>GMimeCipherHash</returnvalue></link>     g_mime_cipher_context_hash_id       (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</type></link> *ctx</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *hash</parameter>);</programlisting>
<para>
Gets the hash id based on the hash name <parameter>hash</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCipherContext"><type>GMimeCipherContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>hash</parameter>&#160;:</term>
<listitem><simpara>hash name
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the equivalent hash id or <link linkend="GMIME-CIPHER-HASH-DEFAULT:CAPS"><type>GMIME_CIPHER_HASH_DEFAULT</type></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-cipher-context-hash-name" role="function">
<title>g_mime_cipher_context_hash_name ()</title>
<indexterm zone="g-mime-cipher-context-hash-name"><primary>g_mime_cipher_context_hash_name</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_cipher_context_hash_name     (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimeCipherHash"><type>GMimeCipherHash</type></link> hash</parameter>);</programlisting>
<para>
Gets the hash name based on the hash id <parameter>hash</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCipherContext"><type>GMimeCipherContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>hash</parameter>&#160;:</term>
<listitem><simpara>hash id
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the equivalent hash name or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-cipher-context-sign" role="function">
<title>g_mime_cipher_context_sign ()</title>
<indexterm zone="g-mime-cipher-context-sign"><primary>g_mime_cipher_context_sign</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_cipher_context_sign          (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</type></link> *ctx</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *userid</parameter>,
                                                         <parameter><link linkend="GMimeCipherHash"><type>GMimeCipherHash</type></link> hash</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="GMimeCipherContext"><type>GMimeCipherContext</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>hash</parameter>&#160;:</term>
<listitem><simpara>preferred Message-Integrity-Check hash algorithm
</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="GMimeCipherHash"><type>GMimeCipherHash</type></link> used on success (useful if <parameter>hash</parameter> is
specified as <link linkend="GMIME-CIPHER-HASH-DEFAULT:CAPS"><type>GMIME_CIPHER_HASH_DEFAULT</type></link>) or <link linkend="1:CAPS"><literal>-1</literal></link> on fail.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-cipher-context-verify" role="function">
<title>g_mime_cipher_context_verify ()</title>
<indexterm zone="g-mime-cipher-context-verify"><primary>g_mime_cipher_context_verify</primary></indexterm>
<programlisting><link linkend="GMimeSignatureValidity"><returnvalue>GMimeSignatureValidity</returnvalue></link> * g_mime_cipher_context_verify   (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="GMimeCipherHash"><type>GMimeCipherHash</type></link> hash</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="GMimeCipherContext"><type>GMimeCipherContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>hash</parameter>&#160;:</term>
<listitem><simpara>secure hash used
</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="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> structure containing information
about the integrity of the input stream or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on failure to
execute at all.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-cipher-context-encrypt" role="function">
<title>g_mime_cipher_context_encrypt ()</title>
<indexterm zone="g-mime-cipher-context-encrypt"><primary>g_mime_cipher_context_encrypt</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_cipher_context_encrypt       (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</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="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="GMimeCipherContext"><type>GMimeCipherContext</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>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-cipher-context-decrypt" role="function">
<title>g_mime_cipher_context_decrypt ()</title>
<indexterm zone="g-mime-cipher-context-decrypt"><primary>g_mime_cipher_context_decrypt</primary></indexterm>
<programlisting><link linkend="GMimeSignatureValidity"><returnvalue>GMimeSignatureValidity</returnvalue></link> * g_mime_cipher_context_decrypt  (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</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="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> will have signer information included and
the signature status will be one of <link linkend="GMIME-SIGNATURE-STATUS-GOOD:CAPS"><type>GMIME_SIGNATURE_STATUS_GOOD</type></link>,
<link linkend="GMIME-SIGNATURE-STATUS-BAD:CAPS"><type>GMIME_SIGNATURE_STATUS_BAD</type></link>, or <link linkend="GMIME-SIGNATURE-STATUS-UNKNOWN:CAPS"><type>GMIME_SIGNATURE_STATUS_UNKNOWN</type></link>.
</para>
<para>
If the encrypted input text was not signed, then the signature
status of the returned <link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> will be
<link linkend="GMIME-SIGNATURE-STATUS-NONE:CAPS"><type>GMIME_SIGNATURE_STATUS_NONE</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeCipherContext"><type>GMimeCipherContext</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="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> on success or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on error.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-cipher-context-import-keys" role="function">
<title>g_mime_cipher_context_import_keys ()</title>
<indexterm zone="g-mime-cipher-context-import-keys"><primary>g_mime_cipher_context_import_keys</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_cipher_context_import_keys   (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</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="GMimeCipherContext"><type>GMimeCipherContext</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-cipher-context-export-keys" role="function">
<title>g_mime_cipher_context_export_keys ()</title>
<indexterm zone="g-mime-cipher-context-export-keys"><primary>g_mime_cipher_context_export_keys</primary></indexterm>
<programlisting><link linkend="int"><returnvalue>int</returnvalue></link>                 g_mime_cipher_context_export_keys   (<parameter><link linkend="GMimeCipherContext"><type>GMimeCipherContext</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="GMimeCipherContext"><type>GMimeCipherContext</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="g-mime-signer-new" role="function">
<title>g_mime_signer_new ()</title>
<indexterm zone="g-mime-signer-new"><primary>g_mime_signer_new</primary></indexterm>
<programlisting><link linkend="GMimeSigner"><returnvalue>GMimeSigner</returnvalue></link> *       g_mime_signer_new                   (<parameter><type>void</type></parameter>);</programlisting>
<para>
Allocates an new <link linkend="GMimeSigner"><type>GMimeSigner</type></link>.
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GMimeSigner"><type>GMimeSigner</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-free" role="function">
<title>g_mime_signer_free ()</title>
<indexterm zone="g-mime-signer-free"><primary>g_mime_signer_free</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_free                  (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Free's the singleton signer.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>signer
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-next" role="function">
<title>g_mime_signer_next ()</title>
<indexterm zone="g-mime-signer-next"><primary>g_mime_signer_next</primary></indexterm>
<programlisting><link linkend="GMimeSigner"><returnvalue>GMimeSigner</returnvalue></link> *       g_mime_signer_next                  (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Advance to the next signer.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the next <link linkend="GMimeSigner"><type>GMimeSigner</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link> when complete.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-status" role="function">
<title>g_mime_signer_get_status ()</title>
<indexterm zone="g-mime-signer-get-status"><primary>g_mime_signer_get_status</primary></indexterm>
<programlisting><link linkend="GMimeSignerStatus"><returnvalue>GMimeSignerStatus</returnvalue></link>   g_mime_signer_get_status            (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the signer status.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the signer status.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-status" role="function">
<title>g_mime_signer_set_status ()</title>
<indexterm zone="g-mime-signer-set-status"><primary>g_mime_signer_set_status</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_status            (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="GMimeSignerStatus"><type>GMimeSignerStatus</type></link> status</parameter>);</programlisting>
<para>
Set the status on the signer.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSignerStatus"><type>GMimeSignerStatus</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-errors" role="function">
<title>g_mime_signer_get_errors ()</title>
<indexterm zone="g-mime-signer-get-errors"><primary>g_mime_signer_get_errors</primary></indexterm>
<programlisting><link linkend="GMimeSignerError"><returnvalue>GMimeSignerError</returnvalue></link>    g_mime_signer_get_errors            (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the signer errors.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the signer errors.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-errors" role="function">
<title>g_mime_signer_set_errors ()</title>
<indexterm zone="g-mime-signer-set-errors"><primary>g_mime_signer_set_errors</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_errors            (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="GMimeSignerError"><type>GMimeSignerError</type></link> error</parameter>);</programlisting>
<para>
Set the errors on the signer.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSignerError"><type>GMimeSignerError</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-trust" role="function">
<title>g_mime_signer_get_trust ()</title>
<indexterm zone="g-mime-signer-get-trust"><primary>g_mime_signer_get_trust</primary></indexterm>
<programlisting><link linkend="GMimeSignerTrust"><returnvalue>GMimeSignerTrust</returnvalue></link>    g_mime_signer_get_trust             (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the signer trust.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the signer trust.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-trust" role="function">
<title>g_mime_signer_set_trust ()</title>
<indexterm zone="g-mime-signer-set-trust"><primary>g_mime_signer_set_trust</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_trust             (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="GMimeSignerTrust"><type>GMimeSignerTrust</type></link> trust</parameter>);</programlisting>
<para>
Set the signer trust.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>trust</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSignerTrust"><type>GMimeSignerTrust</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-issuer-serial" role="function">
<title>g_mime_signer_get_issuer_serial ()</title>
<indexterm zone="g-mime-signer-get-issuer-serial"><primary>g_mime_signer_get_issuer_serial</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_signer_get_issuer_serial     (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the signer's issuer serial.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the signer's issuer serial.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-issuer-serial" role="function">
<title>g_mime_signer_set_issuer_serial ()</title>
<indexterm zone="g-mime-signer-set-issuer-serial"><primary>g_mime_signer_set_issuer_serial</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_issuer_serial     (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *issuer_serial</parameter>);</programlisting>
<para>
Set the signer's issuer serial.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>issuer_serial</parameter>&#160;:</term>
<listitem><simpara>signer's issuer serial
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-issuer-name" role="function">
<title>g_mime_signer_get_issuer_name ()</title>
<indexterm zone="g-mime-signer-get-issuer-name"><primary>g_mime_signer_get_issuer_name</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_signer_get_issuer_name       (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the signer's issuer name.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the signer's issuer name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-issuer-name" role="function">
<title>g_mime_signer_set_issuer_name ()</title>
<indexterm zone="g-mime-signer-set-issuer-name"><primary>g_mime_signer_set_issuer_name</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_issuer_name       (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *issuer_name</parameter>);</programlisting>
<para>
Set the signer's issuer name.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>issuer_name</parameter>&#160;:</term>
<listitem><simpara>signer's issuer name
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-fingerprint" role="function">
<title>g_mime_signer_get_fingerprint ()</title>
<indexterm zone="g-mime-signer-get-fingerprint"><primary>g_mime_signer_get_fingerprint</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_signer_get_fingerprint       (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the signer's key fingerprint.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the signer's key fingerprint.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-fingerprint" role="function">
<title>g_mime_signer_set_fingerprint ()</title>
<indexterm zone="g-mime-signer-set-fingerprint"><primary>g_mime_signer_set_fingerprint</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_fingerprint       (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *fingerprint</parameter>);</programlisting>
<para>
Set the signer's key fingerprint.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fingerprint</parameter>&#160;:</term>
<listitem><simpara>fingerprint string
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-sig-created" role="function">
<title>g_mime_signer_get_sig_created ()</title>
<indexterm zone="g-mime-signer-get-sig-created"><primary>g_mime_signer_get_sig_created</primary></indexterm>
<programlisting><link linkend="time-t"><returnvalue>time_t</returnvalue></link>              g_mime_signer_get_sig_created       (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the creation date of the signer's signature.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the creation date of the signer's signature.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-sig-created" role="function">
<title>g_mime_signer_set_sig_created ()</title>
<indexterm zone="g-mime-signer-set-sig-created"><primary>g_mime_signer_set_sig_created</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_sig_created       (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="time-t"><type>time_t</type></link> created</parameter>);</programlisting>
<para>
Set the creation date of the signer's signature.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>created</parameter>&#160;:</term>
<listitem><simpara>creation date
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-sig-expires" role="function">
<title>g_mime_signer_get_sig_expires ()</title>
<indexterm zone="g-mime-signer-get-sig-expires"><primary>g_mime_signer_get_sig_expires</primary></indexterm>
<programlisting><link linkend="time-t"><returnvalue>time_t</returnvalue></link>              g_mime_signer_get_sig_expires       (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the expiration date of the signer's signature.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the expiration date of the signer's signature.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-sig-expires" role="function">
<title>g_mime_signer_set_sig_expires ()</title>
<indexterm zone="g-mime-signer-set-sig-expires"><primary>g_mime_signer_set_sig_expires</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_sig_expires       (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="time-t"><type>time_t</type></link> expires</parameter>);</programlisting>
<para>
Set the expiration date of the signer's signature.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>expires</parameter>&#160;:</term>
<listitem><simpara>expiration date
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-key-created" role="function">
<title>g_mime_signer_get_key_created ()</title>
<indexterm zone="g-mime-signer-get-key-created"><primary>g_mime_signer_get_key_created</primary></indexterm>
<programlisting><link linkend="time-t"><returnvalue>time_t</returnvalue></link>              g_mime_signer_get_key_created       (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the creation date of the signer's key.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the creation date of the signer's key.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-key-created" role="function">
<title>g_mime_signer_set_key_created ()</title>
<indexterm zone="g-mime-signer-set-key-created"><primary>g_mime_signer_set_key_created</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_key_created       (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="time-t"><type>time_t</type></link> created</parameter>);</programlisting>
<para>
Set the creation date of the signer's key.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>created</parameter>&#160;:</term>
<listitem><simpara>creation date
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-key-expires" role="function">
<title>g_mime_signer_get_key_expires ()</title>
<indexterm zone="g-mime-signer-get-key-expires"><primary>g_mime_signer_get_key_expires</primary></indexterm>
<programlisting><link linkend="time-t"><returnvalue>time_t</returnvalue></link>              g_mime_signer_get_key_expires       (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the expiration date of the signer's key.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the expiration date of the signer's key.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-key-expires" role="function">
<title>g_mime_signer_set_key_expires ()</title>
<indexterm zone="g-mime-signer-set-key-expires"><primary>g_mime_signer_set_key_expires</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_key_expires       (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter><link linkend="time-t"><type>time_t</type></link> expires</parameter>);</programlisting>
<para>
Set the expiration date of the signer's key.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>expires</parameter>&#160;:</term>
<listitem><simpara>expiration date
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-key-id" role="function">
<title>g_mime_signer_get_key_id ()</title>
<indexterm zone="g-mime-signer-get-key-id"><primary>g_mime_signer_get_key_id</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_signer_get_key_id            (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the signer's key id.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the signer's key id.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-key-id" role="function">
<title>g_mime_signer_set_key_id ()</title>
<indexterm zone="g-mime-signer-set-key-id"><primary>g_mime_signer_set_key_id</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_key_id            (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *key_id</parameter>);</programlisting>
<para>
Set the signer's key id.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>key_id</parameter>&#160;:</term>
<listitem><simpara>key id
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-email" role="function">
<title>g_mime_signer_get_email ()</title>
<indexterm zone="g-mime-signer-get-email"><primary>g_mime_signer_get_email</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_signer_get_email             (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the signer's email.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the signer's email.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-email" role="function">
<title>g_mime_signer_set_email ()</title>
<indexterm zone="g-mime-signer-set-email"><primary>g_mime_signer_set_email</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_email             (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *email</parameter>);</programlisting>
<para>
Set the signer's email.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>email</parameter>&#160;:</term>
<listitem><simpara>signer's email
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-get-name" role="function">
<title>g_mime_signer_get_name ()</title>
<indexterm zone="g-mime-signer-get-name"><primary>g_mime_signer_get_name</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_signer_get_name              (<parameter>const <link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Get the signer's name.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the signer's name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signer-set-name" role="function">
<title>g_mime_signer_set_name ()</title>
<indexterm zone="g-mime-signer-set-name"><primary>g_mime_signer_set_name</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signer_set_name              (<parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *name</parameter>);</programlisting>
<para>
Set the signer's name.
</para><variablelist role="params">
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeSigner"><type>GMimeSigner</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara>signer's name
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signature-validity-new" role="function">
<title>g_mime_signature_validity_new ()</title>
<indexterm zone="g-mime-signature-validity-new"><primary>g_mime_signature_validity_new</primary></indexterm>
<programlisting><link linkend="GMimeSignatureValidity"><returnvalue>GMimeSignatureValidity</returnvalue></link> * g_mime_signature_validity_new  (<parameter><type>void</type></parameter>);</programlisting>
<para>
Creates a new <link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link>.
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signature-validity-free" role="function">
<title>g_mime_signature_validity_free ()</title>
<indexterm zone="g-mime-signature-validity-free"><primary>g_mime_signature_validity_free</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signature_validity_free      (<parameter><link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>);</programlisting>
<para>
Frees the memory used by <parameter>validity</parameter> back to the system.
</para><variablelist role="params">
<varlistentry><term><parameter>validity</parameter>&#160;:</term>
<listitem><simpara>signature validity
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signature-validity-set-status" role="function">
<title>g_mime_signature_validity_set_status ()</title>
<indexterm zone="g-mime-signature-validity-set-status"><primary>g_mime_signature_validity_set_status</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signature_validity_set_status
                                                        (<parameter><link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>,
                                                         <parameter><link linkend="GMimeSignatureStatus"><type>GMimeSignatureStatus</type></link> status</parameter>);</programlisting>
<para>
Sets the status of the signature on <parameter>validity</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>validity</parameter>&#160;:</term>
<listitem><simpara>signature validity
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>status</parameter>&#160;:</term>
<listitem><simpara>GOOD, BAD or UNKNOWN
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signature-validity-get-status" role="function">
<title>g_mime_signature_validity_get_status ()</title>
<indexterm zone="g-mime-signature-validity-get-status"><primary>g_mime_signature_validity_get_status</primary></indexterm>
<programlisting><link linkend="GMimeSignatureStatus"><returnvalue>GMimeSignatureStatus</returnvalue></link>  g_mime_signature_validity_get_status
                                                        (<parameter>const <link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>);</programlisting>
<para>
Gets the signature status (GOOD, BAD, UNKNOWN).
</para><variablelist role="params">
<varlistentry><term><parameter>validity</parameter>&#160;:</term>
<listitem><simpara>signature validity
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GMimeSignatureStatus"><type>GMimeSignatureStatus</type></link> value.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signature-validity-set-details" role="function">
<title>g_mime_signature_validity_set_details ()</title>
<indexterm zone="g-mime-signature-validity-set-details"><primary>g_mime_signature_validity_set_details</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signature_validity_set_details
                                                        (<parameter><link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *details</parameter>);</programlisting>
<para>
Sets <parameter>details</parameter> as the status details string on <parameter>validity</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>validity</parameter>&#160;:</term>
<listitem><simpara>signature validity
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>details</parameter>&#160;:</term>
<listitem><simpara>details string
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signature-validity-get-details" role="function">
<title>g_mime_signature_validity_get_details ()</title>
<indexterm zone="g-mime-signature-validity-get-details"><primary>g_mime_signature_validity_get_details</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_signature_validity_get_details
                                                        (<parameter>const <link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>);</programlisting>
<para>
Gets any user-readable status details.
</para><variablelist role="params">
<varlistentry><term><parameter>validity</parameter>&#160;:</term>
<listitem><simpara>signature validity
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a user-readable string containing any status information.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signature-validity-add-signer" role="function">
<title>g_mime_signature_validity_add_signer ()</title>
<indexterm zone="g-mime-signature-validity-add-signer"><primary>g_mime_signature_validity_add_signer</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_signature_validity_add_signer
                                                        (<parameter><link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>,
                                                         <parameter><link linkend="GMimeSigner"><type>GMimeSigner</type></link> *signer</parameter>);</programlisting>
<para>
Adds <parameter>signer</parameter> to the list of signers on <parameter>validity</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>validity</parameter>&#160;:</term>
<listitem><simpara>signature validity
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>signer</parameter>&#160;:</term>
<listitem><simpara>signer
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-signature-validity-get-signers" role="function">
<title>g_mime_signature_validity_get_signers ()</title>
<indexterm zone="g-mime-signature-validity-get-signers"><primary>g_mime_signature_validity_get_signers</primary></indexterm>
<programlisting>const <link linkend="GMimeSigner"><returnvalue>GMimeSigner</returnvalue></link> * g_mime_signature_validity_get_signers
                                                        (<parameter>const <link linkend="GMimeSignatureValidity"><type>GMimeSignatureValidity</type></link> *validity</parameter>);</programlisting>
<para>
Gets the list of signers.
</para><variablelist role="params">
<varlistentry><term><parameter>validity</parameter>&#160;:</term>
<listitem><simpara>signature validity
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GMimeSigner"><type>GMimeSigner</type></link> list which contain further information such
as trust and cipher keys.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

</refentry>
