Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 9e72f3e7ecf68cce016a7c5c59e863d3 > files > 352

lib64polarssl-devel-1.3.8-1.mga4.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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>PolarSSL v1.3.8: entropy.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PolarSSL v1.3.8
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></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>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_6a9bbd12bf4e19a18c45e270f8fae3fd.html">include</a></li><li class="navelem"><a class="el" href="dir_04272d44da4745cf8b8bfc767d6c6523.html">polarssl</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">entropy.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="entropy_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#ifndef POLARSSL_ENTROPY_H</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ENTROPY_H</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#if !defined(POLARSSL_CONFIG_FILE)</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="config_8h.html">config.h</a>&quot;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#include POLARSSL_CONFIG_FILE</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#if defined(POLARSSL_SHA512_C) &amp;&amp; !defined(POLARSSL_ENTROPY_FORCE_SHA256)</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="sha512_8h.html">sha512.h</a>&quot;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="entropy_8h.html#a9d15b029b1caee03c5c2b77b81c1147f">   40</a></span>&#160;<span class="preprocessor">#define POLARSSL_ENTROPY_SHA512_ACCUMULATOR</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#else</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#if defined(POLARSSL_SHA256_C)</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_ENTROPY_SHA256_ACCUMULATOR</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="sha256_8h.html">sha256.h</a>&quot;</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#if defined(POLARSSL_THREADING_C)</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="threading_8h.html">threading.h</a>&quot;</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">#if defined(POLARSSL_HAVEGE_C)</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="havege_8h.html">havege.h</a>&quot;</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="entropy_8h.html#ab9ff2b3b04c80aa19556ed9676bf35e2">   56</a></span>&#160;<span class="preprocessor">#define POLARSSL_ERR_ENTROPY_SOURCE_FAILED                 -0x003C  </span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="entropy_8h.html#a91eeab75dbfc3730efdc415f57e9f4ac">   57</a></span>&#160;<span class="preprocessor">#define POLARSSL_ERR_ENTROPY_MAX_SOURCES                   -0x003E  </span></div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="entropy_8h.html#a0b3765116f6d9d1cbdd5d2c4faee5d33">   58</a></span>&#160;<span class="preprocessor">#define POLARSSL_ERR_ENTROPY_NO_SOURCES_DEFINED            -0x0040  </span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="entropy_8h.html#a348fa499b6e890de696df6b23d9cce39">   59</a></span>&#160;<span class="preprocessor">#define POLARSSL_ERR_ENTROPY_FILE_IO_ERROR                 -0x0058  </span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="preprocessor">#if !defined(ENTROPY_MAX_SOURCES)</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="entropy_8h.html#a5e9ba2c083acc78efc758deca62d162d">   70</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define ENTROPY_MAX_SOURCES     20      </span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="preprocessor">#if !defined(ENTROPY_MAX_GATHER)</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="entropy_8h.html#acc7f201066c056a514433c5a6224b720">   74</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define ENTROPY_MAX_GATHER      128     </span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="comment">/* \} name SECTION: Module settings */</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="preprocessor">#if defined(POLARSSL_ENTROPY_SHA512_ACCUMULATOR)</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="entropy_8h.html#a4610ce6582323b8906b9e05ae6253dfb">   80</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define ENTROPY_BLOCK_SIZE      64      </span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define ENTROPY_BLOCK_SIZE      32      </span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="entropy_8h.html#a23cd05df3838590ba3b1688290c9c1fa">   85</a></span>&#160;<span class="preprocessor">#define ENTROPY_MAX_SEED_SIZE   1024    </span></div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="entropy_8h.html#a8c3a8b8e81c2b4e3c03d3704029bca39">   86</a></span>&#160;<span class="preprocessor">#define ENTROPY_SOURCE_MANUAL   ENTROPY_MAX_SOURCES</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="entropy_8h.html#a4267ff128fbe2ca4da2584359821d09d">  103</a></span>&#160;<span class="keyword">typedef</span> int (*<a class="code" href="entropy_8h.html#a4267ff128fbe2ca4da2584359821d09d">f_source_ptr</a>)(<span class="keywordtype">void</span> *data, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *output, <span class="keywordtype">size_t</span> len,</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;                            <span class="keywordtype">size_t</span> *olen);</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="structsource__state.html">  109</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;{</div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="structsource__state.html#a1ce2b87d8ba2a9df5e75705eeee155a2">  111</a></span>&#160;    <a class="code" href="entropy_8h.html#a4267ff128fbe2ca4da2584359821d09d">f_source_ptr</a>    <a class="code" href="structsource__state.html#a1ce2b87d8ba2a9df5e75705eeee155a2">f_source</a>;   </div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="structsource__state.html#a2dbfe60df6a2808b1347990651287758">  112</a></span>&#160;    <span class="keywordtype">void</span> *          <a class="code" href="structsource__state.html#a2dbfe60df6a2808b1347990651287758">p_source</a>;   </div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="structsource__state.html#a645e64c552b6515b0c65685321189d24">  113</a></span>&#160;    <span class="keywordtype">size_t</span>          <a class="code" href="structsource__state.html#a645e64c552b6515b0c65685321189d24">size</a>;       </div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="structsource__state.html#a58050b25725620cafe76c9c1d2b0ecf1">  114</a></span>&#160;    <span class="keywordtype">size_t</span>          <a class="code" href="structsource__state.html#a58050b25725620cafe76c9c1d2b0ecf1">threshold</a>;  </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;}</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<a class="code" href="structsource__state.html">source_state</a>;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="structentropy__context.html">  121</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;{</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="preprocessor">#if defined(POLARSSL_ENTROPY_SHA512_ACCUMULATOR)</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="structentropy__context.html#aefbbd08781221ef60ca9c901398e008f">  124</a></span>&#160;<span class="preprocessor"></span>    <a class="code" href="structsha512__context.html">sha512_context</a>  <a class="code" href="structentropy__context.html#aefbbd08781221ef60ca9c901398e008f">accumulator</a>;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="preprocessor"></span>    <a class="code" href="structsha256__context.html">sha256_context</a>  accumulator;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="structentropy__context.html#a7af60cf36a02db4971577d1da52040bb">  128</a></span>&#160;<span class="preprocessor"></span>    <span class="keywordtype">int</span>             <a class="code" href="structentropy__context.html#a7af60cf36a02db4971577d1da52040bb">source_count</a>;</div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="structentropy__context.html#a386078ac574665c242900d1215dc900b">  129</a></span>&#160;    <a class="code" href="structsource__state.html">source_state</a>    source[<a class="code" href="entropy_8h.html#a5e9ba2c083acc78efc758deca62d162d">ENTROPY_MAX_SOURCES</a>];</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="preprocessor">#if defined(POLARSSL_HAVEGE_C)</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="preprocessor"></span>    <a class="code" href="structhavege__state.html">havege_state</a>    havege_data;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#if defined(POLARSSL_THREADING_C)</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="preprocessor"></span>    threading_mutex_t mutex;    </div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="preprocessor"></span>}</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<a class="code" href="structentropy__context.html">entropy_context</a>;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<span class="keywordtype">void</span> <a class="code" href="entropy_8h.html#a07cc14e42768b04bbcc48a632ad8c442">entropy_init</a>( <a class="code" href="structentropy__context.html">entropy_context</a> *ctx );</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="keywordtype">void</span> <a class="code" href="entropy_8h.html#ace26c056043473a7f12be97117262fd4">entropy_free</a>( <a class="code" href="structentropy__context.html">entropy_context</a> *ctx );</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="keywordtype">int</span> <a class="code" href="entropy_8h.html#a5a9c269e560537d59a4730faaa835fd5">entropy_add_source</a>( <a class="code" href="structentropy__context.html">entropy_context</a> *ctx,</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;                        <a class="code" href="entropy_8h.html#a4267ff128fbe2ca4da2584359821d09d">f_source_ptr</a> f_source, <span class="keywordtype">void</span> *p_source,</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;                        <span class="keywordtype">size_t</span> threshold );</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="keywordtype">int</span> <a class="code" href="entropy_8h.html#abe16e67991416febc3144c0c8888e792">entropy_gather</a>( <a class="code" href="structentropy__context.html">entropy_context</a> *ctx );</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="keywordtype">int</span> <a class="code" href="entropy_8h.html#a2b7d7123b31b42902364989975740fe2">entropy_func</a>( <span class="keywordtype">void</span> *data, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *output, <span class="keywordtype">size_t</span> len );</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="keywordtype">int</span> <a class="code" href="entropy_8h.html#a474ff02ff7707ebffd00672d8e46ddf3">entropy_update_manual</a>( <a class="code" href="structentropy__context.html">entropy_context</a> *ctx,</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;                           <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *data, <span class="keywordtype">size_t</span> len );</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;<span class="preprocessor">#if defined(POLARSSL_FS_IO)</span></div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;<span class="keywordtype">int</span> <a class="code" href="entropy_8h.html#aeec06418558ccfd52a9967ad54f197c4">entropy_write_seed_file</a>( <a class="code" href="structentropy__context.html">entropy_context</a> *ctx, <span class="keyword">const</span> <span class="keywordtype">char</span> *path );</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;<span class="keywordtype">int</span> <a class="code" href="entropy_8h.html#a5d16f198ece9ccdfe5f80780bf5cee33">entropy_update_seed_file</a>( <a class="code" href="structentropy__context.html">entropy_context</a> *ctx, <span class="keyword">const</span> <span class="keywordtype">char</span> *path );</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* POLARSSL_FS_IO */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;<span class="preprocessor">#if defined(POLARSSL_SELF_TEST)</span></div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;<span class="keywordtype">int</span> <a class="code" href="entropy_8h.html#aee40647ce61215ca2765e9ab3c84a47c">entropy_self_test</a>( <span class="keywordtype">int</span> verbose );</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* POLARSSL_SELF_TEST */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;<span class="preprocessor"></span>}</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* entropy.h */</span><span class="preprocessor"></span></div>
<div class="ttc" id="entropy_8h_html_a5a9c269e560537d59a4730faaa835fd5"><div class="ttname"><a href="entropy_8h.html#a5a9c269e560537d59a4730faaa835fd5">entropy_add_source</a></div><div class="ttdeci">int entropy_add_source(entropy_context *ctx, f_source_ptr f_source, void *p_source, size_t threshold)</div><div class="ttdoc">Adds an entropy source to poll (Thread-safe if POLARSSL_THREADING_C is enabled) </div></div>
<div class="ttc" id="entropy_8h_html_a474ff02ff7707ebffd00672d8e46ddf3"><div class="ttname"><a href="entropy_8h.html#a474ff02ff7707ebffd00672d8e46ddf3">entropy_update_manual</a></div><div class="ttdeci">int entropy_update_manual(entropy_context *ctx, const unsigned char *data, size_t len)</div><div class="ttdoc">Add data to the accumulator manually (Thread-safe if POLARSSL_THREADING_C is enabled) ...</div></div>
<div class="ttc" id="structentropy__context_html_aefbbd08781221ef60ca9c901398e008f"><div class="ttname"><a href="structentropy__context.html#aefbbd08781221ef60ca9c901398e008f">entropy_context::accumulator</a></div><div class="ttdeci">sha512_context accumulator</div><div class="ttdef"><b>Definition:</b> <a href="entropy_8h_source.html#l00124">entropy.h:124</a></div></div>
<div class="ttc" id="config_8h_html"><div class="ttname"><a href="config_8h.html">config.h</a></div><div class="ttdoc">Configuration options (set of defines) </div></div>
<div class="ttc" id="entropy_8h_html_abe16e67991416febc3144c0c8888e792"><div class="ttname"><a href="entropy_8h.html#abe16e67991416febc3144c0c8888e792">entropy_gather</a></div><div class="ttdeci">int entropy_gather(entropy_context *ctx)</div><div class="ttdoc">Trigger an extra gather poll for the accumulator (Thread-safe if POLARSSL_THREADING_C is enabled) ...</div></div>
<div class="ttc" id="structentropy__context_html"><div class="ttname"><a href="structentropy__context.html">entropy_context</a></div><div class="ttdoc">Entropy context structure. </div><div class="ttdef"><b>Definition:</b> <a href="entropy_8h_source.html#l00121">entropy.h:121</a></div></div>
<div class="ttc" id="structentropy__context_html_a7af60cf36a02db4971577d1da52040bb"><div class="ttname"><a href="structentropy__context.html#a7af60cf36a02db4971577d1da52040bb">entropy_context::source_count</a></div><div class="ttdeci">int source_count</div><div class="ttdef"><b>Definition:</b> <a href="entropy_8h_source.html#l00128">entropy.h:128</a></div></div>
<div class="ttc" id="structsource__state_html_a2dbfe60df6a2808b1347990651287758"><div class="ttname"><a href="structsource__state.html#a2dbfe60df6a2808b1347990651287758">source_state::p_source</a></div><div class="ttdeci">void * p_source</div><div class="ttdoc">The callback data pointer. </div><div class="ttdef"><b>Definition:</b> <a href="entropy_8h_source.html#l00112">entropy.h:112</a></div></div>
<div class="ttc" id="entropy_8h_html_a4267ff128fbe2ca4da2584359821d09d"><div class="ttname"><a href="entropy_8h.html#a4267ff128fbe2ca4da2584359821d09d">f_source_ptr</a></div><div class="ttdeci">int(* f_source_ptr)(void *data, unsigned char *output, size_t len, size_t *olen)</div><div class="ttdoc">Entropy poll callback pointer. </div><div class="ttdef"><b>Definition:</b> <a href="entropy_8h_source.html#l00103">entropy.h:103</a></div></div>
<div class="ttc" id="structsource__state_html"><div class="ttname"><a href="structsource__state.html">source_state</a></div><div class="ttdoc">Entropy source state. </div><div class="ttdef"><b>Definition:</b> <a href="entropy_8h_source.html#l00109">entropy.h:109</a></div></div>
<div class="ttc" id="entropy_8h_html_aeec06418558ccfd52a9967ad54f197c4"><div class="ttname"><a href="entropy_8h.html#aeec06418558ccfd52a9967ad54f197c4">entropy_write_seed_file</a></div><div class="ttdeci">int entropy_write_seed_file(entropy_context *ctx, const char *path)</div><div class="ttdoc">Write a seed file. </div></div>
<div class="ttc" id="threading_8h_html"><div class="ttname"><a href="threading_8h.html">threading.h</a></div><div class="ttdoc">Threading abstraction layer. </div></div>
<div class="ttc" id="structsource__state_html_a645e64c552b6515b0c65685321189d24"><div class="ttname"><a href="structsource__state.html#a645e64c552b6515b0c65685321189d24">source_state::size</a></div><div class="ttdeci">size_t size</div><div class="ttdoc">Amount received. </div><div class="ttdef"><b>Definition:</b> <a href="entropy_8h_source.html#l00113">entropy.h:113</a></div></div>
<div class="ttc" id="structsource__state_html_a1ce2b87d8ba2a9df5e75705eeee155a2"><div class="ttname"><a href="structsource__state.html#a1ce2b87d8ba2a9df5e75705eeee155a2">source_state::f_source</a></div><div class="ttdeci">f_source_ptr f_source</div><div class="ttdoc">The entropy source callback. </div><div class="ttdef"><b>Definition:</b> <a href="entropy_8h_source.html#l00111">entropy.h:111</a></div></div>
<div class="ttc" id="structsha512__context_html"><div class="ttname"><a href="structsha512__context.html">sha512_context</a></div><div class="ttdoc">SHA-512 context structure. </div><div class="ttdef"><b>Definition:</b> <a href="sha512_8h_source.html#l00059">sha512.h:59</a></div></div>
<div class="ttc" id="structhavege__state_html"><div class="ttname"><a href="structhavege__state.html">havege_state</a></div><div class="ttdoc">HAVEGE state structure. </div><div class="ttdef"><b>Definition:</b> <a href="havege_8h_source.html#l00041">havege.h:41</a></div></div>
<div class="ttc" id="havege_8h_html"><div class="ttname"><a href="havege_8h.html">havege.h</a></div><div class="ttdoc">HAVEGE: HArdware Volatile Entropy Gathering and Expansion. </div></div>
<div class="ttc" id="entropy_8h_html_a5e9ba2c083acc78efc758deca62d162d"><div class="ttname"><a href="entropy_8h.html#a5e9ba2c083acc78efc758deca62d162d">ENTROPY_MAX_SOURCES</a></div><div class="ttdeci">#define ENTROPY_MAX_SOURCES</div><div class="ttdoc">Maximum number of sources supported. </div><div class="ttdef"><b>Definition:</b> <a href="entropy_8h_source.html#l00070">entropy.h:70</a></div></div>
<div class="ttc" id="entropy_8h_html_aee40647ce61215ca2765e9ab3c84a47c"><div class="ttname"><a href="entropy_8h.html#aee40647ce61215ca2765e9ab3c84a47c">entropy_self_test</a></div><div class="ttdeci">int entropy_self_test(int verbose)</div><div class="ttdoc">Checkup routine. </div></div>
<div class="ttc" id="structsource__state_html_a58050b25725620cafe76c9c1d2b0ecf1"><div class="ttname"><a href="structsource__state.html#a58050b25725620cafe76c9c1d2b0ecf1">source_state::threshold</a></div><div class="ttdeci">size_t threshold</div><div class="ttdoc">Minimum level required before release. </div><div class="ttdef"><b>Definition:</b> <a href="entropy_8h_source.html#l00114">entropy.h:114</a></div></div>
<div class="ttc" id="sha512_8h_html"><div class="ttname"><a href="sha512_8h.html">sha512.h</a></div><div class="ttdoc">SHA-384 and SHA-512 cryptographic hash function. </div></div>
<div class="ttc" id="entropy_8h_html_a5d16f198ece9ccdfe5f80780bf5cee33"><div class="ttname"><a href="entropy_8h.html#a5d16f198ece9ccdfe5f80780bf5cee33">entropy_update_seed_file</a></div><div class="ttdeci">int entropy_update_seed_file(entropy_context *ctx, const char *path)</div><div class="ttdoc">Read and update a seed file. </div></div>
<div class="ttc" id="structsha256__context_html"><div class="ttname"><a href="structsha256__context.html">sha256_context</a></div><div class="ttdoc">SHA-256 context structure. </div><div class="ttdef"><b>Definition:</b> <a href="sha256_8h_source.html#l00058">sha256.h:58</a></div></div>
<div class="ttc" id="entropy_8h_html_a07cc14e42768b04bbcc48a632ad8c442"><div class="ttname"><a href="entropy_8h.html#a07cc14e42768b04bbcc48a632ad8c442">entropy_init</a></div><div class="ttdeci">void entropy_init(entropy_context *ctx)</div><div class="ttdoc">Initialize the context. </div></div>
<div class="ttc" id="sha256_8h_html"><div class="ttname"><a href="sha256_8h.html">sha256.h</a></div><div class="ttdoc">SHA-224 and SHA-256 cryptographic hash function. </div></div>
<div class="ttc" id="entropy_8h_html_a2b7d7123b31b42902364989975740fe2"><div class="ttname"><a href="entropy_8h.html#a2b7d7123b31b42902364989975740fe2">entropy_func</a></div><div class="ttdeci">int entropy_func(void *data, unsigned char *output, size_t len)</div><div class="ttdoc">Retrieve entropy from the accumulator (Maximum length: ENTROPY_BLOCK_SIZE) (Thread-safe if POLARSSL_T...</div></div>
<div class="ttc" id="entropy_8h_html_ace26c056043473a7f12be97117262fd4"><div class="ttname"><a href="entropy_8h.html#ace26c056043473a7f12be97117262fd4">entropy_free</a></div><div class="ttdeci">void entropy_free(entropy_context *ctx)</div><div class="ttdoc">Free the data in the context. </div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jul 31 2014 11:35:51 for PolarSSL v1.3.8 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>