|
bool | operator== (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Comparison.
|
|
bool | operator!= (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Comparison.
|
|
bool | operator> (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Comparison.
|
|
bool | operator>= (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Comparison.
|
|
bool | operator< (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Comparison.
|
|
bool | operator<= (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Comparison.
|
|
CryptoPP::Integer | operator+ (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Addition.
|
|
CryptoPP::Integer | operator- (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Subtraction.
|
|
CryptoPP::Integer | operator* (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Multiplication.
|
|
CryptoPP::Integer | operator/ (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Division.
|
|
CryptoPP::Integer | operator% (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Remainder.
|
|
CryptoPP::Integer | operator/ (const CryptoPP::Integer &a, CryptoPP::word b) |
| Division.
|
|
CryptoPP::word | operator% (const CryptoPP::Integer &a, CryptoPP::word b) |
| Remainder.
|
|
CryptoPP::Integer | operator& (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Bitwise AND.
|
|
CryptoPP::Integer | operator| (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Bitwise OR.
|
|
CryptoPP::Integer | operator^ (const CryptoPP::Integer &a, const CryptoPP::Integer &b) |
| Bitwise XOR.
|
|
NAMESPACE_END void | swap (CryptoPP::Integer &a, CryptoPP::Integer &b) |
|
Multiple precision integer with arithmetic operations.
The Integer class can represent positive and negative integers with absolute value less than (256**sizeof(word))(256**sizeof(int)).
Internally, the library uses a sign magnitude representation, and the class has two data members. The first is a IntegerSecBlock (a SecBlock<word>) 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 Integer.
For details on how the Integer class initializes its function pointers using InitializeInteger and how it creates Integer::Zero(), Integer::One(), and Integer::Two(), then see the comments at the top of integer.cpp
.
- Since
- Crypto++ 1.0
Definition in file integer.h.
CryptoPP::Integer operator& |
( |
const CryptoPP::Integer & |
a, |
|
|
const CryptoPP::Integer & |
b |
|
) |
| |
|
inline |
Bitwise AND.
- Parameters
-
- Returns
- the result of a & b
operator&() 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.
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.
- Since
- Crypto++ 6.0
Definition at line 798 of file integer.h.
CryptoPP::Integer operator^ |
( |
const CryptoPP::Integer & |
a, |
|
|
const CryptoPP::Integer & |
b |
|
) |
| |
|
inline |
Bitwise XOR.
- Parameters
-
- Returns
- the result of a ^ b
operator^() 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.
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.
- Since
- Crypto++ 6.0
Definition at line 826 of file integer.h.
CryptoPP::Integer operator| |
( |
const CryptoPP::Integer & |
a, |
|
|
const CryptoPP::Integer & |
b |
|
) |
| |
|
inline |
Bitwise OR.
- Parameters
-
- Returns
- the result of a | b
operator|() 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.
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.
- Since
- Crypto++ 6.0
Definition at line 812 of file integer.h.