1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>crypto_shash_descsize</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="ch05s13.html" title="Synchronous Message Digest API"><link rel="prev" href="API-crypto-shash-digestsize.html" title="crypto_shash_digestsize"><link rel="next" href="API-crypto-shash-setkey.html" title="crypto_shash_setkey"></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_shash_descsize</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-crypto-shash-digestsize.html">Prev</a> </td><th width="60%" align="center">Synchronous Message Digest API</th><td width="20%" align="right"> <a accesskey="n" href="API-crypto-shash-setkey.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-crypto-shash-descsize"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>crypto_shash_descsize — 2 obtain the operational state size 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">unsigned int <b class="fsfunc">crypto_shash_descsize </b>(</code></td><td>struct crypto_shash * <var class="pdparam">tfm</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1098275676"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>tfm</code></em></span></dt><dd><p> 4 cipher handle 5 </p></dd></dl></div></div><div class="refsect1"><a name="idp1098277204"></a><h2>Description</h2><p> 6 The size of the operational state the cipher needs during operation is 7 returned for the hash referenced with the cipher handle. This size is 8 required to calculate the memory requirements to allow the caller allocating 9 sufficient memory for operational state. 10 </p><p> 11 12 The operational state is defined with struct shash_desc where the size of 13 that data structure is to be calculated as 14 sizeof(struct shash_desc) + crypto_shash_descsize(alg) 15</p></div><div class="refsect1"><a name="idp1098278380"></a><h2>Return</h2><p> 16 size of the operational state 17</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-crypto-shash-digestsize.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch05s13.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-crypto-shash-setkey.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">crypto_shash_digestsize</span> </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_shash_setkey</span></td></tr></table></div></body></html> 18