Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > b5fdf68d1ef6711be4a04d1550358feb > files > 47

libopendkim-devel-2.4.2-5.fc14.x86_64.rpm

<html>
<head><title>dkim_init()</title></head>
<body>
<!--
$Id: dkim_init.html,v 1.3 2010/07/24 04:52:15 cm-msk Exp $
-->
<h1>dkim_init()</h1>
<p align="right"><a href="index.html">[back to index]</a></p>

<table border="0" cellspacing=4 cellpadding=4>
<!---------- Synopsis ----------->
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
<pre>
#include &lt;dkim.h&gt;
<a href="dkim_lib.html"><tt>DKIM_LIB</tt></a> *dkim_init(
	void *(*mallocf)(void *closure, size_t nbytes),
	void (*freef)(void *closure, void *p)
);
</pre>
Create a new instantiation of the <b>DKIM</b> service, for signing or
verifying Internet messages.
</td></tr>

<!----------- Description ---------->
<tr><th valign="top" align=left>DESCRIPTION</th><td>
<table border="1" cellspacing=1 cellpadding=4>
<tr align="left" valign=top>
<th width="80">Called When</th>
<td><tt>dkim_init()</tt> is called when setting up the application.  The
    handle it returns is used when generating per-message handles for signing
    and verifying, and is used to declare optional alternate memory allocate
    and free functions. </td>
</tr>
</table>

<!----------- Arguments ---------->
<tr><th valign="top" align=left>ARGUMENTS</th><td>
    <table border="1" cellspacing=0>
    <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
    <tr valign="top"><td>mallocf</td>
	<td>Optional alternate memory allocation function.  It must take
        two parameters: a void pointer which is the memory closure
        specified in calls to <a href="dkim_sign.html"><tt>dkim_sign()</tt></a>
        or <a href="dkim_verify.html"><tt>dkim_verify()</tt></a>, and the
        number of bytes to be allocated.  This allows memory allocations for
        a specific message to be made within the same closure.
	</td></tr>
    <tr valign="top"><td>freef</td>
	<td>Optional alternate memory release function.  It must take
        two parameters: a void pointer which is the memory closure
        specified in calls to <a href="dkim_sign.html"><tt>dkim_sign()</tt></a>
        or <a href="dkim_verify.html"><tt>dkim_verify()</tt></a>, and the
        pointer to memory to be released.  This allows memory allocations for
        a specific message to be made within the same closure.
	</td></tr>
    </table>
</td></tr>

<!----------- Notes ---------->
<tr>
<th valign="top" align=left>NOTES</th> 
<td>
<ul>
<li>The handle returned by this function is passed to
    <a href="dkim_sign.html"><tt>dkim_sign()</tt></a> and
    <a href="dkim_verify.html"><tt>dkim_verify()</tt></a>.
</ul>
</td>
</tr>

<!----------- Return Values ---------->
<tr>
<th valign="top" align=left>RETURN VALUES</th> 
<td>
<ul>
<li>On success, a pointer to the created
    <a href="dkim_lib.html"><tt>DKIM_LIB</tt></a> handle is returned.
<li>On failure, NULL is returned.  Generally this means a memory allocation
    failure.
</ul>
</td>
</tr>
</table>

<hr size="1">
<font size="-1">
Copyright (c) 2005, 2007 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
Copyright (c) 2009-2011, The OpenDKIM Project.  All rights reserved.

<br>
By using this file, you agree to the terms and conditions set
forth in the respective licenses.
</font>
</body>
</html>