class_integer.html
来自「Crypto++是一个非常强大的密码学库,主要是功能全」· HTML 代码 · 共 793 行 · 第 1/4 页
HTML
793 行
<td class="md" nowrap valign="top"> unsigned int Integer::Encode </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">byte * </td> <td class="mdname" nowrap> <em>output</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned int </td> <td class="mdname" nowrap> <em>outputLen</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>Signedness </td> <td class="mdname" nowrap> = UNSIGNED</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>encode in big-endian format <p>unsigned means encode absolute value, signed means encode two's complement if negative. if outputLen < MinEncodedSize, the most significant bytes will be dropped if outputLen > MinEncodedSize, the most significant bytes will be padded<p>Definition at line <a class="el" href="integer_8cpp-source.html#l02866">2866</a> of file <a class="el" href="integer_8cpp-source.html">integer.cpp</a>.<p>Referenced by <a class="el" href="integer_8cpp-source.html#l02889">DEREncode()</a>, <a class="el" href="integer_8cpp-source.html#l02911">DEREncodeAsOctetString()</a>, <a class="el" href="pubkey_8cpp-source.html#l00051">TF_EncryptorBase::Encrypt()</a>, and <a class="el" href="integer_8cpp-source.html#l02933">OpenPGPEncode()</a>. </td> </tr></table><a name="_integerz43_12" doxytag="Integer::Randomize"></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"> bool Integer::Randomize </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> & </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> & </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> & </td> <td class="mdname" nowrap> <em>max</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>RandomNumberType </td> <td class="mdname" nowrap> <em>rnType</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="class_integer.html">Integer</a> & </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> & </td> <td class="mdname" nowrap> <em>mod</em> = One()</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>set this Integer to a random element of {x | min <= x <= max and x is of rnType and x mod == equiv} <p>returns false if the set is empty <p>Definition at line <a class="el" href="integer_8cpp-source.html#l02981">2981</a> of file <a class="el" href="integer_8cpp-source.html">integer.cpp</a>.<p>Referenced by <a class="el" href="integer_8cpp-source.html#l02592">Integer()</a>. </td> </tr></table><a name="_integerz47_0" doxytag="Integer::Compare"></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"> int Integer::Compare </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="class_integer.html">Integer</a> & </td> <td class="mdname1" valign="top" nowrap> <em>a</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>signed comparison <p><dl compact><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign=top><em>-1</em> </td><td>if *this < a </td></tr> <tr><td valign=top><em>0</em> </td><td>if *this = a </td></tr> <tr><td valign=top><em>1</em> </td><td>if *this > a</td></tr> </table></dl><p>Definition at line <a class="el" href="integer_8cpp-source.html#l03641">3641</a> of file <a class="el" href="integer_8cpp-source.html">integer.cpp</a>. </td> </tr></table><a name="_x509_public_keya10" doxytag="Integer::BEREncode"></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"> virtual void ASN1Object::BEREncode </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> & </td> <td class="mdname1" valign="top" nowrap> <em>bt</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const<code> [inline, virtual, inherited]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>encode this object into a <a class="el" href="class_buffered_transformation.html">BufferedTransformation</a>, using BER <p>this may be useful if <a class="el" href="class_integer.html#_integerz39_3">DEREncode()</a> would be too inefficient <p>Definition at line <a class="el" href="cryptlib_8h-source.html#l01582">1582</a> of file <a class="el" href="cryptlib_8h-source.html">cryptlib.h</a>.<p>Referenced by <a class="el" href="simple_8h-source.html#l00047">ASN1CryptoMaterial::Save()</a>. </td> </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="integer_8h-source.html">integer.h</a><li><a class="el" href="integer_8cpp-source.html">integer.cpp</a></ul><hr size="1"><address style="align: right;"><small>Generated on Tue Jul 8 23:35:06 2003 for Crypto++ by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.2 </small></address></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?