<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.15"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>Crypto++: integer.h File Reference</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 id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">Crypto++  <span id="projectnumber">7.0</span> </div> <div id="projectbrief">Free C++ class library of cryptographic schemes</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.15 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#nested-classes">Classes</a> | <a href="#typedef-members">Typedefs</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">integer.h File Reference</div> </div> </div><!--header--> <div class="contents"> <p>Multiple precision integer with arithmetic operations. <a href="#details">More...</a></p> <p><a href="integer_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Classes</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_initialize_integer.html">InitializeInteger</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Performs static initialization of the <a class="el" href="class_integer.html" title="Multiple precision integer with arithmetic operations.">Integer</a> class. <a href="struct_initialize_integer.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_integer.html">Integer</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Multiple precision integer with arithmetic operations. <a href="class_integer.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_integer_1_1_divide_by_zero.html">Integer::DivideByZero</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_exception.html" title="Base class for all exceptions thrown by the library.">Exception</a> thrown when division by 0 is encountered. <a href="class_integer_1_1_divide_by_zero.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_integer_1_1_random_number_not_found.html">Integer::RandomNumberNotFound</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_exception.html" title="Base class for all exceptions thrown by the library.">Exception</a> thrown when a random number cannot be found that satisfies the condition. <a href="class_integer_1_1_random_number_not_found.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_integer_1_1_open_p_g_p_decode_err.html">Integer::OpenPGPDecodeErr</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="class_exception.html" title="Base class for all exceptions thrown by the library.">Exception</a> thrown when an error is encountered decoding an OpenPGP integer. <a href="class_integer_1_1_open_p_g_p_decode_err.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> Typedefs</h2></td></tr> <tr class="memitem:af09ee28fe8e43a4425e04218ef27b1eb"><td class="memItemLeft" align="right" valign="top"><a id="af09ee28fe8e43a4425e04218ef27b1eb"></a> typedef <a class="el" href="class_sec_block.html">SecBlock</a>< word, <a class="el" href="class_allocator_with_cleanup.html">AllocatorWithCleanup</a>< word, true > > </td><td class="memItemRight" valign="bottom"><b>IntegerSecBlock</b></td></tr> <tr class="separator:af09ee28fe8e43a4425e04218ef27b1eb"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ade08b3d167d85c38da8c43cfa66a640f"><td class="memItemLeft" align="right" valign="top"><a id="ade08b3d167d85c38da8c43cfa66a640f"></a> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#ade08b3d167d85c38da8c43cfa66a640f">operator==</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:ade08b3d167d85c38da8c43cfa66a640f"><td class="mdescLeft"> </td><td class="mdescRight">Comparison. <br /></td></tr> <tr class="separator:ade08b3d167d85c38da8c43cfa66a640f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae999da0bcfa2f2d91a7acbcec22533dd"><td class="memItemLeft" align="right" valign="top"><a id="ae999da0bcfa2f2d91a7acbcec22533dd"></a> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#ae999da0bcfa2f2d91a7acbcec22533dd">operator!=</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:ae999da0bcfa2f2d91a7acbcec22533dd"><td class="mdescLeft"> </td><td class="mdescRight">Comparison. <br /></td></tr> <tr class="separator:ae999da0bcfa2f2d91a7acbcec22533dd"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae3e6987d592852bb4b9e5096b4c90c64"><td class="memItemLeft" align="right" valign="top"><a id="ae3e6987d592852bb4b9e5096b4c90c64"></a> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#ae3e6987d592852bb4b9e5096b4c90c64">operator></a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:ae3e6987d592852bb4b9e5096b4c90c64"><td class="mdescLeft"> </td><td class="mdescRight">Comparison. <br /></td></tr> <tr class="separator:ae3e6987d592852bb4b9e5096b4c90c64"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7b0ae44df5d3c10c3aab96cbe05dbba5"><td class="memItemLeft" align="right" valign="top"><a id="a7b0ae44df5d3c10c3aab96cbe05dbba5"></a> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#a7b0ae44df5d3c10c3aab96cbe05dbba5">operator>=</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:a7b0ae44df5d3c10c3aab96cbe05dbba5"><td class="mdescLeft"> </td><td class="mdescRight">Comparison. <br /></td></tr> <tr class="separator:a7b0ae44df5d3c10c3aab96cbe05dbba5"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5a89747db6d098fb6e8c57b559a7a215"><td class="memItemLeft" align="right" valign="top"><a id="a5a89747db6d098fb6e8c57b559a7a215"></a> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#a5a89747db6d098fb6e8c57b559a7a215">operator<</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:a5a89747db6d098fb6e8c57b559a7a215"><td class="mdescLeft"> </td><td class="mdescRight">Comparison. <br /></td></tr> <tr class="separator:a5a89747db6d098fb6e8c57b559a7a215"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a98986253088fef35d42e47af391d30d7"><td class="memItemLeft" align="right" valign="top"><a id="a98986253088fef35d42e47af391d30d7"></a> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#a98986253088fef35d42e47af391d30d7">operator<=</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:a98986253088fef35d42e47af391d30d7"><td class="mdescLeft"> </td><td class="mdescRight">Comparison. <br /></td></tr> <tr class="separator:a98986253088fef35d42e47af391d30d7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:afbec1fd1f7b419edb560dc4ee919da7e"><td class="memItemLeft" align="right" valign="top"><a id="afbec1fd1f7b419edb560dc4ee919da7e"></a> inline ::<a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#afbec1fd1f7b419edb560dc4ee919da7e">operator+</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:afbec1fd1f7b419edb560dc4ee919da7e"><td class="mdescLeft"> </td><td class="mdescRight">Addition. <br /></td></tr> <tr class="separator:afbec1fd1f7b419edb560dc4ee919da7e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a608b1434db86edad946fd1c20737c05e"><td class="memItemLeft" align="right" valign="top"><a id="a608b1434db86edad946fd1c20737c05e"></a> inline ::<a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#a608b1434db86edad946fd1c20737c05e">operator-</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:a608b1434db86edad946fd1c20737c05e"><td class="mdescLeft"> </td><td class="mdescRight">Subtraction. <br /></td></tr> <tr class="separator:a608b1434db86edad946fd1c20737c05e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a83bd503d3921cad11bc71203754c2bef"><td class="memItemLeft" align="right" valign="top">inline ::<a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#a83bd503d3921cad11bc71203754c2bef">operator*</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:a83bd503d3921cad11bc71203754c2bef"><td class="mdescLeft"> </td><td class="mdescRight">Multiplication. <a href="#a83bd503d3921cad11bc71203754c2bef">More...</a><br /></td></tr> <tr class="separator:a83bd503d3921cad11bc71203754c2bef"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac429f380c60784a2a84dbf8395e91763"><td class="memItemLeft" align="right" valign="top"><a id="ac429f380c60784a2a84dbf8395e91763"></a> inline ::<a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#ac429f380c60784a2a84dbf8395e91763">operator/</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:ac429f380c60784a2a84dbf8395e91763"><td class="mdescLeft"> </td><td class="mdescRight">Division. <br /></td></tr> <tr class="separator:ac429f380c60784a2a84dbf8395e91763"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a44f26775ef8241769ee4f83607a77747"><td class="memItemLeft" align="right" valign="top">inline ::<a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#a44f26775ef8241769ee4f83607a77747">operator%</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:a44f26775ef8241769ee4f83607a77747"><td class="mdescLeft"> </td><td class="mdescRight">Remainder. <a href="#a44f26775ef8241769ee4f83607a77747">More...</a><br /></td></tr> <tr class="separator:a44f26775ef8241769ee4f83607a77747"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a251267f77c4aa88eef85bb8429ac6c4d"><td class="memItemLeft" align="right" valign="top"><a id="a251267f77c4aa88eef85bb8429ac6c4d"></a> inline ::<a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#a251267f77c4aa88eef85bb8429ac6c4d">operator/</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, ::word b)</td></tr> <tr class="memdesc:a251267f77c4aa88eef85bb8429ac6c4d"><td class="mdescLeft"> </td><td class="mdescRight">Division. <br /></td></tr> <tr class="separator:a251267f77c4aa88eef85bb8429ac6c4d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a44b21d08ddd15c5c053ed4e1e487ddc2"><td class="memItemLeft" align="right" valign="top">inline ::word </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#a44b21d08ddd15c5c053ed4e1e487ddc2">operator%</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, ::word b)</td></tr> <tr class="memdesc:a44b21d08ddd15c5c053ed4e1e487ddc2"><td class="mdescLeft"> </td><td class="mdescRight">Remainder. <a href="#a44b21d08ddd15c5c053ed4e1e487ddc2">More...</a><br /></td></tr> <tr class="separator:a44b21d08ddd15c5c053ed4e1e487ddc2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1e34ca9b97eef5b01e41f91888d17e11"><td class="memItemLeft" align="right" valign="top">inline ::<a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#a1e34ca9b97eef5b01e41f91888d17e11">operator&</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:a1e34ca9b97eef5b01e41f91888d17e11"><td class="mdescLeft"> </td><td class="mdescRight">Bitwise AND. <a href="#a1e34ca9b97eef5b01e41f91888d17e11">More...</a><br /></td></tr> <tr class="separator:a1e34ca9b97eef5b01e41f91888d17e11"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a77bd1e522f3daa33643e6981017a31fb"><td class="memItemLeft" align="right" valign="top">inline ::<a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#a77bd1e522f3daa33643e6981017a31fb">operator|</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:a77bd1e522f3daa33643e6981017a31fb"><td class="mdescLeft"> </td><td class="mdescRight">Bitwise OR. <a href="#a77bd1e522f3daa33643e6981017a31fb">More...</a><br /></td></tr> <tr class="separator:a77bd1e522f3daa33643e6981017a31fb"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a64be1a6a08bd3fa60eac799b0c3f43c2"><td class="memItemLeft" align="right" valign="top">inline ::<a class="el" href="class_integer.html">Integer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="integer_8h.html#a64be1a6a08bd3fa60eac799b0c3f43c2">operator^</a> (const ::<a class="el" href="class_integer.html">Integer</a> &a, const ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="memdesc:a64be1a6a08bd3fa60eac799b0c3f43c2"><td class="mdescLeft"> </td><td class="mdescRight">Bitwise XOR. <a href="#a64be1a6a08bd3fa60eac799b0c3f43c2">More...</a><br /></td></tr> <tr class="separator:a64be1a6a08bd3fa60eac799b0c3f43c2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3134b5c60545180f8cc73f641c46ead6"><td class="memItemLeft" align="right" valign="top"><a id="a3134b5c60545180f8cc73f641c46ead6"></a> void </td><td class="memItemRight" valign="bottom"><b>swap</b> (::<a class="el" href="class_integer.html">Integer</a> &a, ::<a class="el" href="class_integer.html">Integer</a> &b)</td></tr> <tr class="separator:a3134b5c60545180f8cc73f641c46ead6"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Multiple precision integer with arithmetic operations. </p> <p>The <a class="el" href="class_integer.html" title="Multiple precision integer with arithmetic operations.">Integer</a> class can represent positive and negative integers with absolute value less than (256**sizeof(word))<sup>(256**sizeof(int))</sup>.</p> <p>Internally, the library uses a sign magnitude representation, and the class has two data members. The first is a IntegerSecBlock (a <a class="el" href="class_sec_block.html">SecBlock<word></a>) and it is used to hold the representation. The second is a Sign (an enumeration), and it is used to track the sign of the <a class="el" href="class_integer.html" title="Multiple precision integer with arithmetic operations.">Integer</a>.</p> <p>For details on how the <a class="el" href="class_integer.html" title="Multiple precision integer with arithmetic operations.">Integer</a> class initializes its function pointers using <a class="el" href="struct_initialize_integer.html" title="Performs static initialization of the Integer class.">InitializeInteger</a> and how it creates <a class="el" href="class_integer.html#a19b7e6d48b1b57bd4846160ea2928175" title="Integer representing 0.">Integer::Zero()</a>, <a class="el" href="class_integer.html#a8c070592581bf6c2f928c72bfa1c1638" title="Integer representing 1.">Integer::One()</a>, and <a class="el" href="class_integer.html#af0cb74a45a48e677952166bdac9d82d7" title="Integer representing 2.">Integer::Two()</a>, then see the comments at the top of <code><a class="el" href="integer_8cpp_source.html">integer.cpp</a></code>. </p><dl class="section since"><dt>Since</dt><dd>Crypto++ 1.0 </dd></dl> <p class="definition">Definition in file <a class="el" href="integer_8h_source.html">integer.h</a>.</p> </div><h2 class="groupheader">Function Documentation</h2> <a id="a83bd503d3921cad11bc71203754c2bef"></a> <h2 class="memtitle"><span class="permalink"><a href="#a83bd503d3921cad11bc71203754c2bef">◆ </a></span>operator*()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">inline ::<a class="el" href="class_integer.html">Integer</a> operator* </td> <td>(</td> <td class="paramtype">const ::<a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>a</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const ::<a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>b</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Multiplication. </p> <dl class="section see"><dt>See also</dt><dd>a_times_b_mod_c() and a_exp_b_mod_c() </dd></dl> <p class="definition">Definition at line <a class="el" href="integer_8h_source.html#l00750">750</a> of file <a class="el" href="integer_8h_source.html">integer.h</a>.</p> </div> </div> <a id="a44f26775ef8241769ee4f83607a77747"></a> <h2 class="memtitle"><span class="permalink"><a href="#a44f26775ef8241769ee4f83607a77747">◆ </a></span>operator%() <span class="overload">[1/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">inline ::<a class="el" href="class_integer.html">Integer</a> operator% </td> <td>(</td> <td class="paramtype">const ::<a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>a</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const ::<a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>b</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Remainder. </p> <dl class="section see"><dt>See also</dt><dd>a_times_b_mod_c() and a_exp_b_mod_c() </dd></dl> <p class="definition">Definition at line <a class="el" href="integer_8h_source.html#l00755">755</a> of file <a class="el" href="integer_8h_source.html">integer.h</a>.</p> </div> </div> <a id="a44b21d08ddd15c5c053ed4e1e487ddc2"></a> <h2 class="memtitle"><span class="permalink"><a href="#a44b21d08ddd15c5c053ed4e1e487ddc2">◆ </a></span>operator%() <span class="overload">[2/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">inline ::word operator% </td> <td>(</td> <td class="paramtype">const ::<a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>a</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">::word </td> <td class="paramname"><em>b</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Remainder. </p> <dl class="section see"><dt>See also</dt><dd>a_times_b_mod_c() and a_exp_b_mod_c() </dd></dl> <p class="definition">Definition at line <a class="el" href="integer_8h_source.html#l00760">760</a> of file <a class="el" href="integer_8h_source.html">integer.h</a>.</p> </div> </div> <a id="a1e34ca9b97eef5b01e41f91888d17e11"></a> <h2 class="memtitle"><span class="permalink"><a href="#a1e34ca9b97eef5b01e41f91888d17e11">◆ </a></span>operator&()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">inline ::<a class="el" href="class_integer.html">Integer</a> operator& </td> <td>(</td> <td class="paramtype">const ::<a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>a</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const ::<a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>b</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Bitwise AND. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">a</td><td>the first <a class="el" href="class_integer.html" title="Multiple precision integer with arithmetic operations.">Integer</a> </td></tr> <tr><td class="paramname">b</td><td>the second <a class="el" href="class_integer.html" title="Multiple precision integer with arithmetic operations.">Integer</a> </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the result of a & b</dd></dl> <p><a class="el" href="integer_8h.html#a1e34ca9b97eef5b01e41f91888d17e11" title="Bitwise AND.">operator&()</a> performs a bitwise AND on the operands. Missing bits are truncated at the most significant bit positions, so the result is as small as the smaller of the operands.</p> <p>Internally, Crypto++ uses a sign-magnitude representation. The library does not attempt to interpret bits, and the result is always POSITIVE. If needed, the integer should be converted to a 2's compliment representation before performing the operation. </p><dl class="section since"><dt>Since</dt><dd>Crypto++ 6.0 </dd></dl> <p class="definition">Definition at line <a class="el" href="integer_8h_source.html#l00774">774</a> of file <a class="el" href="integer_8h_source.html">integer.h</a>.</p> </div> </div> <a id="a77bd1e522f3daa33643e6981017a31fb"></a> <h2 class="memtitle"><span class="permalink"><a href="#a77bd1e522f3daa33643e6981017a31fb">◆ </a></span>operator|()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">inline ::<a class="el" href="class_integer.html">Integer</a> operator| </td> <td>(</td> <td class="paramtype">const ::<a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>a</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const ::<a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>b</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Bitwise OR. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">a</td><td>the first <a class="el" href="class_integer.html" title="Multiple precision integer with arithmetic operations.">Integer</a> </td></tr> <tr><td class="paramname">b</td><td>the second <a class="el" href="class_integer.html" title="Multiple precision integer with arithmetic operations.">Integer</a> </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the result of a | b</dd></dl> <p><a class="el" href="integer_8h.html#a77bd1e522f3daa33643e6981017a31fb" title="Bitwise OR.">operator|()</a> performs a bitwise OR on the operands. Missing bits are shifted in at the most significant bit positions, so the result is as large as the larger of the operands.</p> <p>Internally, Crypto++ uses a sign-magnitude representation. The library does not attempt to interpret bits, and the result is always POSITIVE. If needed, the integer should be converted to a 2's compliment representation before performing the operation. </p><dl class="section since"><dt>Since</dt><dd>Crypto++ 6.0 </dd></dl> <p class="definition">Definition at line <a class="el" href="integer_8h_source.html#l00788">788</a> of file <a class="el" href="integer_8h_source.html">integer.h</a>.</p> </div> </div> <a id="a64be1a6a08bd3fa60eac799b0c3f43c2"></a> <h2 class="memtitle"><span class="permalink"><a href="#a64be1a6a08bd3fa60eac799b0c3f43c2">◆ </a></span>operator^()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">inline ::<a class="el" href="class_integer.html">Integer</a> operator^ </td> <td>(</td> <td class="paramtype">const ::<a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>a</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const ::<a class="el" href="class_integer.html">Integer</a> & </td> <td class="paramname"><em>b</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Bitwise XOR. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">a</td><td>the first <a class="el" href="class_integer.html" title="Multiple precision integer with arithmetic operations.">Integer</a> </td></tr> <tr><td class="paramname">b</td><td>the second <a class="el" href="class_integer.html" title="Multiple precision integer with arithmetic operations.">Integer</a> </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the result of a ^ b</dd></dl> <p><a class="el" href="integer_8h.html#a64be1a6a08bd3fa60eac799b0c3f43c2" title="Bitwise XOR.">operator^()</a> performs a bitwise XOR on the operands. Missing bits are shifted in at the most significant bit positions, so the result is as large as the larger of the operands.</p> <p>Internally, Crypto++ uses a sign-magnitude representation. The library does not attempt to interpret bits, and the result is always POSITIVE. If needed, the integer should be converted to a 2's compliment representation before performing the operation. </p><dl class="section since"><dt>Since</dt><dd>Crypto++ 6.0 </dd></dl> <p class="definition">Definition at line <a class="el" href="integer_8h_source.html#l00802">802</a> of file <a class="el" href="integer_8h_source.html">integer.h</a>.</p> </div> </div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Wed Nov 27 2019 15:03:50 for Crypto++ by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.15 </small></address> </body> </html>