/usr/share/doc/libucommon-dev/a00111.html is in libucommon-doc 3.2.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | <!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>UCommon: ucc::Random Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00214.html">ucc</a>::<a class="el" href="a00111.html">Random</a>
</div>
</div>
<div class="contents">
<h1>ucc::Random Class Reference</h1><!-- doxytag: class="ucc::Random" -->
<p>Crytographically relevant random numbers.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="a00203_source.html">secure.h</a>></code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#a0104117d59b3586d6f253cc9e1df0b74">fill</a> (unsigned char *memory, size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Fill memory with pseudo-random values. <a href="#a0104117d59b3586d6f253cc9e1df0b74"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#ad1e4841c6fb0ad2cc0d571891a40b340">get</a> (int min, int max)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get a pseudo-random integer in a preset range. <a href="#ad1e4841c6fb0ad2cc0d571891a40b340"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#ae07e66b7d01b4419758cc7ff640f2620">get</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get a pseudo-random integer, range 0 - 32767. <a href="#ae07e66b7d01b4419758cc7ff640f2620"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#a702692956d9f415c70ad4971bece9156">key</a> (unsigned char *memory, size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get high-entropy random data. <a href="#a702692956d9f415c70ad4971bece9156"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#a82f265d19e354177453de9a777681f47">real</a> (double min, double max)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get a pseudo-random floating point value in a preset range. <a href="#a82f265d19e354177453de9a777681f47"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static double </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#af5aa201857a4ce486e19eaded7136818">real</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get a pseudo-random floating point value. <a href="#af5aa201857a4ce486e19eaded7136818"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0a69a41dca075e8ebb7f4fbe22c2b524"></a><!-- doxytag: member="ucc::Random::seed" ref="a0a69a41dca075e8ebb7f4fbe22c2b524" args="(void)" -->
static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#a0a69a41dca075e8ebb7f4fbe22c2b524">seed</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Re-seed pseudo-random generation and entropy pools. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#a60e5d601b711ef6b0a89c547033668fe">seed</a> (const unsigned char *buffer, size_t size)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Push entropic seed. <a href="#a60e5d601b711ef6b0a89c547033668fe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00111.html#a76699105f3edfae14d6ae86a4b0b3fd8">status</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Determine if we have sufficient entropy to return random values. <a href="#a76699105f3edfae14d6ae86a4b0b3fd8"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Crytographically relevant random numbers. </p>
<p>This is used both to gather entropy pools and pseudo-random values. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>> </dd></dl>
<p>Definition at line <a class="el" href="a00203_source.html#l00436">436</a> of file <a class="el" href="a00203_source.html">secure.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a0104117d59b3586d6f253cc9e1df0b74"></a><!-- doxytag: member="ucc::Random::fill" ref="a0104117d59b3586d6f253cc9e1df0b74" args="(unsigned char *memory, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static size_t ucc::Random::fill </td>
<td>(</td>
<td class="paramtype">unsigned char * </td>
<td class="paramname"> <em>memory</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Fill memory with pseudo-random values. </p>
<p>This is used as the basis for all get and real operations and does not depend on seed entropy. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>memory</em> </td><td>buffer to fill. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of buffer to fill. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of bytes set. </dd></dl>
</div>
</div>
<a class="anchor" id="ad1e4841c6fb0ad2cc0d571891a40b340"></a><!-- doxytag: member="ucc::Random::get" ref="ad1e4841c6fb0ad2cc0d571891a40b340" args="(int min, int max)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static int ucc::Random::get </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>min</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>max</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get a pseudo-random integer in a preset range. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>min</em> </td><td>value of random integer. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>max</em> </td><td>value of random integer. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>random value from min to max. </dd></dl>
</div>
</div>
<a class="anchor" id="ae07e66b7d01b4419758cc7ff640f2620"></a><!-- doxytag: member="ucc::Random::get" ref="ae07e66b7d01b4419758cc7ff640f2620" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static int ucc::Random::get </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get a pseudo-random integer, range 0 - 32767. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>random integer. </dd></dl>
</div>
</div>
<a class="anchor" id="a702692956d9f415c70ad4971bece9156"></a><!-- doxytag: member="ucc::Random::key" ref="a702692956d9f415c70ad4971bece9156" args="(unsigned char *memory, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static size_t ucc::Random::key </td>
<td>(</td>
<td class="paramtype">unsigned char * </td>
<td class="paramname"> <em>memory</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get high-entropy random data. </p>
<p>This is often used to initialize keys. This operation may block if there is insufficient entropy immediately available. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>memory</em> </td><td>buffer to fill. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of buffer. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of bytes filled. </dd></dl>
</div>
</div>
<a class="anchor" id="a82f265d19e354177453de9a777681f47"></a><!-- doxytag: member="ucc::Random::real" ref="a82f265d19e354177453de9a777681f47" args="(double min, double max)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static double ucc::Random::real </td>
<td>(</td>
<td class="paramtype">double </td>
<td class="paramname"> <em>min</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"> <em>max</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get a pseudo-random floating point value in a preset range. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>min</em> </td><td>value of random floating point number. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>max</em> </td><td>value of random floating point number. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>random value from min to max. </dd></dl>
</div>
</div>
<a class="anchor" id="af5aa201857a4ce486e19eaded7136818"></a><!-- doxytag: member="ucc::Random::real" ref="af5aa201857a4ce486e19eaded7136818" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static double ucc::Random::real </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get a pseudo-random floating point value. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>psudo-random value 0 to 1. </dd></dl>
</div>
</div>
<a class="anchor" id="a60e5d601b711ef6b0a89c547033668fe"></a><!-- doxytag: member="ucc::Random::seed" ref="a60e5d601b711ef6b0a89c547033668fe" args="(const unsigned char *buffer, size_t size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static bool ucc::Random::seed </td>
<td>(</td>
<td class="paramtype">const unsigned char * </td>
<td class="paramname"> <em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Push entropic seed. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>of random data to push. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of buffer. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful. </dd></dl>
</div>
</div>
<a class="anchor" id="a76699105f3edfae14d6ae86a4b0b3fd8"></a><!-- doxytag: member="ucc::Random::status" ref="a76699105f3edfae14d6ae86a4b0b3fd8" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static bool ucc::Random::status </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Determine if we have sufficient entropy to return random values. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if sufficient entropy. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00203_source.html">secure.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:40 2010 for UCommon by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|