1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Synchronous Message Digest API</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="API.html" title="Chapter&#160;5.&#160;Programming Interface"><link rel="prev" href="API-ahash-request-set-crypt.html" title="ahash_request_set_crypt"><link rel="next" href="API-crypto-alloc-shash.html" title="crypto_alloc_shash"></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">Synchronous Message Digest API</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-ahash-request-set-crypt.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;5.&#160;Programming Interface</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-crypto-alloc-shash.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp1098238964"></a>Synchronous Message Digest API</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-crypto-alloc-shash.html"><span class="phrase">crypto_alloc_shash</span></a></span><span class="refpurpose"> &#8212; 
2  allocate message digest handle
3 </span></dt><dt><span class="refentrytitle"><a href="API-crypto-free-shash.html"><span class="phrase">crypto_free_shash</span></a></span><span class="refpurpose"> &#8212; 
4  zeroize and free the message digest handle
5 </span></dt><dt><span class="refentrytitle"><a href="API-crypto-shash-blocksize.html"><span class="phrase">crypto_shash_blocksize</span></a></span><span class="refpurpose"> &#8212; 
6  obtain block size for cipher
7 </span></dt><dt><span class="refentrytitle"><a href="API-crypto-shash-digestsize.html"><span class="phrase">crypto_shash_digestsize</span></a></span><span class="refpurpose"> &#8212; 
8  obtain message digest size
9 </span></dt><dt><span class="refentrytitle"><a href="API-crypto-shash-descsize.html"><span class="phrase">crypto_shash_descsize</span></a></span><span class="refpurpose"> &#8212; 
10  obtain the operational state size
11 </span></dt><dt><span class="refentrytitle"><a href="API-crypto-shash-setkey.html"><span class="phrase">crypto_shash_setkey</span></a></span><span class="refpurpose"> &#8212; 
12  set key for message digest
13 </span></dt><dt><span class="refentrytitle"><a href="API-crypto-shash-digest.html"><span class="phrase">crypto_shash_digest</span></a></span><span class="refpurpose"> &#8212; 
14  calculate message digest for buffer
15 </span></dt><dt><span class="refentrytitle"><a href="API-crypto-shash-export.html"><span class="phrase">crypto_shash_export</span></a></span><span class="refpurpose"> &#8212; 
16  extract operational state for message digest
17 </span></dt><dt><span class="refentrytitle"><a href="API-crypto-shash-import.html"><span class="phrase">crypto_shash_import</span></a></span><span class="refpurpose"> &#8212; 
18  import operational state
19 </span></dt><dt><span class="refentrytitle"><a href="API-crypto-shash-init.html"><span class="phrase">crypto_shash_init</span></a></span><span class="refpurpose"> &#8212; 
20  (re)initialize message digest
21 </span></dt><dt><span class="refentrytitle"><a href="API-crypto-shash-update.html"><span class="phrase">crypto_shash_update</span></a></span><span class="refpurpose"> &#8212; 
22  add data to message digest for processing
23 </span></dt><dt><span class="refentrytitle"><a href="API-crypto-shash-final.html"><span class="phrase">crypto_shash_final</span></a></span><span class="refpurpose"> &#8212; 
24  calculate message digest
25 </span></dt><dt><span class="refentrytitle"><a href="API-crypto-shash-finup.html"><span class="phrase">crypto_shash_finup</span></a></span><span class="refpurpose"> &#8212; 
26  calculate message digest of buffer
27 </span></dt></dl></div><p>
28   </p><p>
29   The synchronous message digest API is used with the ciphers of type
30   CRYPTO_ALG_TYPE_SHASH (listed as type <span class="quote">&#8220;<span class="quote">shash</span>&#8221;</span> in /proc/crypto)
31   </p><p>
32   The message digest API is able to maintain state information for the
33   caller.
34   </p><p>
35   The synchronous message digest API can store user-related context in in its
36   shash_desc request data structure.
37</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-ahash-request-set-crypt.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="API.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-crypto-alloc-shash.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">ahash_request_set_crypt</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">crypto_alloc_shash</span></td></tr></table></div></body></html>
38