Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 7392c77c84ff25edfeb07995a77d5148 > files > 462

steghide-0.5.1-11mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>steghide: PseudoRandomSource 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.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>PseudoRandomSource Class Reference</h1><!-- doxytag: class="PseudoRandomSource" -->this class serves as a source of reproducible (pseudo-)random numbers  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="PseudoRandomSource_8h_source.html">PseudoRandomSource.h</a>&gt;</code>
<p>

<p>
<a href="classPseudoRandomSource-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPseudoRandomSource.html#99178fce83f11ef778d93c125d8b0638">PseudoRandomSource</a> (<a class="el" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> s)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPseudoRandomSource.html#8ef2aa9bb5419cbaf1d7a28f958115f9">getValue</a> (<a class="el" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> n)</td></tr>

<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPseudoRandomSource.html#7b82ea9bcac4633974b9d10f260d3f4e">Value</a></td></tr>

<tr><td colspan="2"><br><h2>Static Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static const <a class="el" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPseudoRandomSource.html#5b780fa93c41e7057e00e44faaaa2dca">A</a> = 1367208549</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static const <a class="el" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPseudoRandomSource.html#4a35b7e561bfcf7c8031ce0e985a992e">C</a> = 1</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
To generate the random numbers, the linear congruetial method is used. 2^32 is used as modulus. The overflow in the implementation is intended (and controlled, as UWORD32 is used as datatype which always is 32 bits wide). <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="99178fce83f11ef778d93c125d8b0638"></a><!-- doxytag: member="PseudoRandomSource::PseudoRandomSource" ref="99178fce83f11ef778d93c125d8b0638" args="(UWORD32 s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PseudoRandomSource::PseudoRandomSource           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a>&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
construct a <a class="el" href="classPseudoRandomSource.html" title="this class serves as a source of reproducible (pseudo-)random numbers">PseudoRandomSource</a> object <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>the seed </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="8ef2aa9bb5419cbaf1d7a28f958115f9"></a><!-- doxytag: member="PseudoRandomSource::getValue" ref="8ef2aa9bb5419cbaf1d7a28f958115f9" args="(UWORD32 n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> PseudoRandomSource::getValue           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a>&nbsp;</td>
          <td class="paramname"> <em>n</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
get a pseudo-random value from {0,...,n-1} <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>the range of the random value to be returned </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>a number &gt;= 0 and &lt;= n - 1</dd></dl>
After calling getValue, the next getValue call will use the next state of the random number generator (analogous to the C rand() function) 
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="5b780fa93c41e7057e00e44faaaa2dca"></a><!-- doxytag: member="PseudoRandomSource::A" ref="5b780fa93c41e7057e00e44faaaa2dca" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> <a class="el" href="classPseudoRandomSource.html#5b780fa93c41e7057e00e44faaaa2dca">PseudoRandomSource::A</a> = 1367208549<code> [static, private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="4a35b7e561bfcf7c8031ce0e985a992e"></a><!-- doxytag: member="PseudoRandomSource::C" ref="4a35b7e561bfcf7c8031ce0e985a992e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> <a class="el" href="classPseudoRandomSource.html#4a35b7e561bfcf7c8031ce0e985a992e">PseudoRandomSource::C</a> = 1<code> [static, private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="7b82ea9bcac4633974b9d10f260d3f4e"></a><!-- doxytag: member="PseudoRandomSource::Value" ref="7b82ea9bcac4633974b9d10f260d3f4e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="common_8h.html#6b8592979b076e06aa233e3f586ac999">UWORD32</a> <a class="el" href="classPseudoRandomSource.html#7b82ea9bcac4633974b9d10f260d3f4e">PseudoRandomSource::Value</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="PseudoRandomSource_8h_source.html">PseudoRandomSource.h</a><li><a class="el" href="PseudoRandomSource_8cc.html">PseudoRandomSource.cc</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Aug 17 10:58:32 2009 for steghide by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>