class_integer.html

来自「Crypto++是一个非常强大的密码学库,主要是功能全」· HTML 代码 · 共 793 行 · 第 1/4 页

HTML
793
字号
<tr><td class="memItemLeft" nowrap align=right valign=top><a name="_integern6" doxytag="Integer::PositiveDivide"></a>void&nbsp;</td><td class="memItemRight" valign=bottom><b>PositiveDivide</b> (<a class="el" href="class_integer.html">Integer</a> &amp;remainder, <a class="el" href="class_integer.html">Integer</a> &amp;quotient, const <a class="el" href="class_integer.html">Integer</a> &amp;dividend, const <a class="el" href="class_integer.html">Integer</a> &amp;divisor)</td></tr></table><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="_integerz37_3" doxytag="Integer::Integer"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> Integer::Integer </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const char *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>str</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [explicit]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>convert from string <p>str can be in base 2, 8, 10, or 16. Base is determined by a case insensitive suffix of 'h', 'o', or 'b'. No suffix means base 10.<p>Definition at line <a class="el" href="integer_8cpp-source.html#l02782">2782</a> of file <a class="el" href="integer_8cpp-source.html">integer.cpp</a>.    </td>  </tr></table><a name="_integerz37_8" doxytag="Integer::Integer"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> Integer::Integer </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>rng</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>unsigned int&nbsp;</td>          <td class="mdname" nowrap> <em>bitcount</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>create a random integer <p>The random integer created is uniformly distributed over [0, 2**bitcount). <p>Definition at line <a class="el" href="integer_8cpp-source.html#l02592">2592</a> of file <a class="el" href="integer_8cpp-source.html">integer.cpp</a>.<p>References <a class="el" href="integer_8cpp-source.html#l02981">Randomize()</a>.    </td>  </tr></table><a name="_integerz37_9" doxytag="Integer::Integer"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> Integer::Integer </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>rng</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="class_integer.html">Integer</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>min</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="class_integer.html">Integer</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>max</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>RandomNumberType&nbsp;</td>          <td class="mdname" nowrap> <em>rnType</em> = ANY, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="class_integer.html">Integer</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>equiv</em> = Zero(), </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const <a class="el" href="class_integer.html">Integer</a> &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>mod</em> = One()</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>create a random integer of special type <p>Ideally, the random integer created should be uniformly distributed over {x | min &lt;= x &lt;= max and x is of rnType and x  mod == equiv}. However the actual distribution may not be uniform because sequential search is used to find an appropriate number from a random starting point. May return (with very small probability) a pseudoprime when a prime is requested and max &gt; lastSmallPrime*lastSmallPrime (lastSmallPrime is declared in <a class="el" href="nbtheory_8h.html">nbtheory.h</a>). <dl compact><dt><b>Exceptions:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign=top><em>RandomNumberNotFound</em>&nbsp;</td><td>if the set is empty.</td></tr>  </table></dl><p>Definition at line <a class="el" href="integer_8cpp-source.html#l02597">2597</a> of file <a class="el" href="integer_8cpp-source.html">integer.cpp</a>.<p>References <a class="el" href="integer_8cpp-source.html#l02981">Randomize()</a>.    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="_integerz39_0" doxytag="Integer::MinEncodedSize"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> unsigned int Integer::MinEncodedSize </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">Signedness&nbsp;</td>          <td class="mdname1" valign="top" nowrap> = UNSIGNED          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap> const</td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>minimum number of bytes to encode this integer <p>MinEncodedSize of 0 is 1 <p>Definition at line <a class="el" href="integer_8cpp-source.html#l02854">2854</a> of file <a class="el" href="integer_8cpp-source.html">integer.cpp</a>.<p>References <a class="el" href="integer_8cpp-source.html#l02799">ByteCount()</a>, <a class="el" href="integer_8cpp-source.html#l02666">GetByte()</a>, and <a class="el" href="integer_8cpp-source.html#l02603">Power2()</a>.<p>Referenced by <a class="el" href="integer_8cpp-source.html#l02889">DEREncode()</a>.    </td>  </tr></table><a name="_integerz39_1" doxytag="Integer::Encode"></a><p><table class="mdTable" width="100%" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?