1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>crypto_alloc_ahash</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Kernel Crypto API"><link rel="up" href="ch05s11.html" title="Asynchronous Message Digest API"><link rel="prev" href="ch05s11.html" title="Asynchronous Message Digest API"><link rel="next" href="API-crypto-free-ahash.html" title="crypto_free_ahash"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">crypto_alloc_ahash</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch05s11.html">Prev</a> </td><th width="60%" align="center">Asynchronous Message Digest API</th><td width="20%" align="right"> <a accesskey="n" href="API-crypto-free-ahash.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-crypto-alloc-ahash"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>crypto_alloc_ahash — 2 allocate ahash cipher handle 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">struct crypto_ahash * <b class="fsfunc">crypto_alloc_ahash </b>(</code></td><td>const char * <var class="pdparam">alg_name</var>, </td></tr><tr><td> </td><td>u32 <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>u32 <var class="pdparam">mask</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1098099052"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>alg_name</code></em></span></dt><dd><p> 4 is the cra_name / name or cra_driver_name / driver name of the 5 ahash cipher 6 </p></dd><dt><span class="term"><em class="parameter"><code>type</code></em></span></dt><dd><p> 7 specifies the type of the cipher 8 </p></dd><dt><span class="term"><em class="parameter"><code>mask</code></em></span></dt><dd><p> 9 specifies the mask for the cipher 10 </p></dd></dl></div></div><div class="refsect1"><a name="idp1098102684"></a><h2>Description</h2><p> 11 Allocate a cipher handle for an ahash. The returned struct 12 crypto_ahash is the cipher handle that is required for any subsequent 13 API invocation for that ahash. 14</p></div><div class="refsect1"><a name="idp1098103436"></a><h2>Return</h2><p> 15 allocated cipher handle in case of success; <code class="function">IS_ERR</code> is true in case 16 of an error, <code class="function">PTR_ERR</code> returns the error code. 17</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch05s11.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch05s11.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-crypto-free-ahash.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Asynchronous Message Digest API </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">crypto_free_ahash</span></td></tr></table></div></body></html> 18