kget
mse::BigInt Class Reference
#include <bigint.h>
Detailed Description
Class which can hold an arbitrary large integer. This will be a very important part of our MSE implementation.
Definition at line 42 of file bigint.h.
Public Member Functions | |
| BigInt (const BigInt &bi) | |
| BigInt (const QString &value) | |
| BigInt (Uint32 num_bits=0) | |
| BigInt & | operator= (const BigInt &bi) |
| Uint32 | toBuffer (Uint8 *buf, Uint32 max_size) const |
| virtual | ~BigInt () |
Static Public Member Functions | |
| static BigInt | fromBuffer (const Uint8 *buf, Uint32 size) |
| static BigInt | powerMod (const BigInt &x, const BigInt &e, const BigInt &d) |
| static BigInt | random () |
Constructor & Destructor Documentation
| mse::BigInt::BigInt | ( | Uint32 | num_bits = 0 |
) |
Create a big integer, with num_bits bits.
All bits will be set to 0.
- Parameters:
-
num_bits The number of bits
| mse::BigInt::BigInt | ( | const QString & | value | ) |
Create a big integer of a string.
The string must be a hexadecimal representation of an integer. For example : 12AFFE123488BBBE123
Letters can be upper or lower case. Invalid chars will create an invalid number.
- Parameters:
-
value The hexadecimal representation of the number
Definition at line 38 of file bigint.cpp.
| mse::BigInt::BigInt | ( | const BigInt & | bi | ) |
| mse::BigInt::~BigInt | ( | ) | [virtual] |
Definition at line 49 of file bigint.cpp.
Member Function Documentation
| static BigInt mse::BigInt::fromBuffer | ( | const Uint8 * | buf, | |
| Uint32 | size | |||
| ) | [static] |
Make a BigInt out of a buffer.
Assignment operator.
- Parameters:
-
bi The BigInt to copy
- Returns:
- *this
Definition at line 55 of file bigint.cpp.
| BigInt mse::BigInt::random | ( | ) | [static] |
| Uint32 mse::BigInt::toBuffer | ( | Uint8 * | buf, | |
| Uint32 | max_size | |||
| ) | const |
Export the bigint ot a buffer.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference