1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct hash_alg_common</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="ch05s10.html" title="Message Digest Algorithm Definitions"><link rel="prev" href="ch05s10.html" title="Message Digest Algorithm Definitions"><link rel="next" href="API-struct-ahash-alg.html" title="struct ahash_alg"></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">struct hash_alg_common</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch05s10.html">Prev</a> </td><th width="60%" align="center">Message Digest Algorithm Definitions</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-ahash-alg.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-hash-alg-common"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct hash_alg_common — 2 define properties of message digest 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct hash_alg_common { 5 unsigned int digestsize; 6 unsigned int statesize; 7 struct crypto_alg base; 8}; </pre></div><div class="refsect1"><a name="idp1098055748"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">digestsize</span></dt><dd><p> 9Size of the result of the transformation. A buffer of this size 10must be available to the <em class="parameter"><code>final</code></em> and <em class="parameter"><code>finup</code></em> calls, so they can 11store the resulting hash into it. For various predefined sizes, 12search include/crypto/ using 13git grep _DIGEST_SIZE include/crypto. 14 </p></dd><dt><span class="term">statesize</span></dt><dd><p> 15Size of the block for partial state of the transformation. A 16buffer of this size must be passed to the <em class="parameter"><code>export</code></em> function as it 17will save the partial state of the transformation into it. On the 18other side, the <em class="parameter"><code>import</code></em> function will load the state from a 19buffer of this size as well. 20 </p></dd><dt><span class="term">base</span></dt><dd><p> 21Start of data structure of cipher algorithm. The common data 22structure of crypto_alg contains information common to all ciphers. 23The hash_alg_common data structure now adds the hash-specific 24information. 25 </p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch05s10.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch05s10.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-struct-ahash-alg.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Message Digest Algorithm Definitions </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">struct ahash_alg</span></td></tr></table></div></body></html> 26