Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 8df484ca79a7b6bb61e4a376e1506870 > files > 205

polarssl-devel-0.14.3-1.fc14.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>PolarSSL: polarssl/sha4.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PolarSSL</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">polarssl/sha4.h</div>  </div>
</div>
<div class="contents">
<a href="sha4_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00025"></a>00025 <span class="preprocessor">#ifndef POLARSSL_SHA4_H</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_SHA4_H</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="preprocessor">#if defined(_MSC_VER) || defined(__WATCOMC__)</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">  #define UL64(x) x##ui64</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">  #define int64 __int64</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">  #define UL64(x) x##ULL</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">  #define int64 long long</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span>
<a name="l00039"></a><a class="code" href="structsha4__context.html">00039</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00040"></a>00040 {
<a name="l00041"></a><a class="code" href="structsha4__context.html#a09e6f0f8e2e6f10b1cf5f0e5b89b3fe5">00041</a>     <span class="keywordtype">unsigned</span> int64 total[2];    
<a name="l00042"></a><a class="code" href="structsha4__context.html#a6b312614c8e343b53b14aa052ccb757f">00042</a>     <span class="keywordtype">unsigned</span> int64 state[8];    
<a name="l00043"></a><a class="code" href="structsha4__context.html#a191644f12fd73d672fbdff1234cbd647">00043</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> buffer[128];  
<a name="l00045"></a><a class="code" href="structsha4__context.html#a4d879f8e1cbc969d93e7bcaaa30cb71e">00045</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> ipad[128];    
<a name="l00046"></a><a class="code" href="structsha4__context.html#acaca3fbd846509513cf20f2487dcf2c3">00046</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> opad[128];    
<a name="l00047"></a><a class="code" href="structsha4__context.html#a95fa5e9b77b7a9048ef69051b63ff879">00047</a>     <span class="keywordtype">int</span> <a class="code" href="structsha4__context.html#a95fa5e9b77b7a9048ef69051b63ff879">is384</a>;                  
<a name="l00048"></a>00048 }
<a name="l00049"></a>00049 <a class="code" href="structsha4__context.html" title="SHA-512 context structure.">sha4_context</a>;
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00053"></a>00053 <span class="preprocessor">#endif</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span>
<a name="l00061"></a>00061 <span class="keywordtype">void</span> <a class="code" href="sha4_8h.html#ab152870dd98be1cfeea1394f422e3055" title="SHA-512 context setup.">sha4_starts</a>( <a class="code" href="structsha4__context.html" title="SHA-512 context structure.">sha4_context</a> *ctx, <span class="keywordtype">int</span> is384 );
<a name="l00062"></a>00062 
<a name="l00070"></a>00070 <span class="keywordtype">void</span> <a class="code" href="sha4_8h.html#a59dff4571f4f843cf3753356dd405086" title="SHA-512 process buffer.">sha4_update</a>( <a class="code" href="structsha4__context.html" title="SHA-512 context structure.">sha4_context</a> *ctx, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *input, <span class="keywordtype">int</span> ilen );
<a name="l00071"></a>00071 
<a name="l00078"></a>00078 <span class="keywordtype">void</span> <a class="code" href="sha4_8h.html#aed771099fecbcf252bea69c0a1346a02" title="SHA-512 final digest.">sha4_finish</a>( <a class="code" href="structsha4__context.html" title="SHA-512 context structure.">sha4_context</a> *ctx, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> output[64] );
<a name="l00079"></a>00079 
<a name="l00088"></a>00088 <span class="keywordtype">void</span> <a class="code" href="sha4_8h.html#a7300003bd634faa835d569765fafdfa8" title="Output = SHA-512( input buffer )">sha4</a>( <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *input, <span class="keywordtype">int</span> ilen,
<a name="l00089"></a>00089            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> output[64], <span class="keywordtype">int</span> is384 );
<a name="l00090"></a>00090 
<a name="l00101"></a>00101 <span class="keywordtype">int</span> <a class="code" href="sha4_8h.html#a29bb41ffb93df67269af9a2a83077ca1" title="Output = SHA-512( file contents )">sha4_file</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *path, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> output[64], <span class="keywordtype">int</span> is384 );
<a name="l00102"></a>00102 
<a name="l00111"></a>00111 <span class="keywordtype">void</span> <a class="code" href="sha4_8h.html#a4e54e709630c49c3984e1fd829dd1d89" title="SHA-512 HMAC context setup.">sha4_hmac_starts</a>( <a class="code" href="structsha4__context.html" title="SHA-512 context structure.">sha4_context</a> *ctx, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *key, <span class="keywordtype">int</span> keylen,
<a name="l00112"></a>00112                        <span class="keywordtype">int</span> is384 );
<a name="l00113"></a>00113 
<a name="l00121"></a>00121 <span class="keywordtype">void</span> <a class="code" href="sha4_8h.html#abf4d666ca79a2b11be4b82b40007f540" title="SHA-512 HMAC process buffer.">sha4_hmac_update</a>( <a class="code" href="structsha4__context.html" title="SHA-512 context structure.">sha4_context</a> *ctx, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *input, <span class="keywordtype">int</span> ilen );
<a name="l00122"></a>00122 
<a name="l00129"></a>00129 <span class="keywordtype">void</span> <a class="code" href="sha4_8h.html#afff6b8cda70eae78da06c354c3e53741" title="SHA-512 HMAC final digest.">sha4_hmac_finish</a>( <a class="code" href="structsha4__context.html" title="SHA-512 context structure.">sha4_context</a> *ctx, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> output[64] );
<a name="l00130"></a>00130 
<a name="l00136"></a>00136 <span class="keywordtype">void</span> <a class="code" href="sha4_8h.html#a1affdc5c4e1e08279d5a70ee7902fdde" title="SHA-512 HMAC context reset.">sha4_hmac_reset</a>( <a class="code" href="structsha4__context.html" title="SHA-512 context structure.">sha4_context</a> *ctx );
<a name="l00137"></a>00137 
<a name="l00148"></a>00148 <span class="keywordtype">void</span> <a class="code" href="sha4_8h.html#a666f616c9223b005c6b70c4b14c92eb3" title="Output = HMAC-SHA-512( hmac key, input buffer )">sha4_hmac</a>( <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *key, <span class="keywordtype">int</span> keylen,
<a name="l00149"></a>00149                 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *input, <span class="keywordtype">int</span> ilen,
<a name="l00150"></a>00150                 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> output[64], <span class="keywordtype">int</span> is384 );
<a name="l00151"></a>00151 
<a name="l00157"></a>00157 <span class="keywordtype">int</span> <a class="code" href="sha4_8h.html#a19bce9b4f0e3b849243e216737c9a5bc" title="Checkup routine.">sha4_self_test</a>( <span class="keywordtype">int</span> verbose );
<a name="l00158"></a>00158 
<a name="l00159"></a>00159 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00160"></a>00160 <span class="preprocessor"></span>}
<a name="l00161"></a>00161 <span class="preprocessor">#endif</span>
<a name="l00162"></a>00162 <span class="preprocessor"></span>
<a name="l00163"></a>00163 <span class="preprocessor">#endif </span><span class="comment">/* sha4.h */</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated on Mon May 16 2011 for PolarSSL by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>