| 37 | namespace Firebird { |
| 38 | |
| 39 | class BigInteger |
| 40 | { |
| 41 | public: |
| 42 | BigInteger(); |
| 43 | explicit BigInteger(const char* text, unsigned int radix = 16u); |
| 44 | BigInteger(unsigned int count, const unsigned char* bytes); |
| 45 | explicit BigInteger(const Firebird::UCharBuffer& val); |
| 46 | BigInteger(const BigInteger& val); |
| 47 | // BigInteger(int numBits, Random& r); |
| 48 | ~BigInteger(); |
| 49 | |
| 50 | BigInteger& operator= (const BigInteger& val); |
| 51 | void random(int numBytes); |
| 52 | void assign(unsigned int count, const unsigned char* bytes); |
| 53 | |
| 54 | BigInteger operator+ (const BigInteger& val) const; |
| 55 | BigInteger operator- (const BigInteger& val) const; |
| 56 | BigInteger operator* (const BigInteger& val) const; |
| 57 | BigInteger operator/ (const BigInteger& val) const; |
| 58 | BigInteger operator% (const BigInteger& val) const; |
| 59 | |
| 60 | BigInteger& operator+= (const BigInteger& val); |
| 61 | BigInteger& operator-= (const BigInteger& val); |
| 62 | BigInteger& operator*= (const BigInteger& val); |
| 63 | BigInteger& operator/= (const BigInteger& val); |
| 64 | BigInteger& operator%= (const BigInteger& val); |
| 65 | |
| 66 | bool operator== (const BigInteger& val) const; |
| 67 | |
| 68 | void getBytes(Firebird::UCharBuffer& bytes) const; |
| 69 | unsigned int length() const; |
| 70 | void getText(Firebird::string& str, unsigned int radix = 16u) const; |
| 71 | |
| 72 | BigInteger modPow(const BigInteger& pow, const BigInteger& mod) const; |
| 73 | |
| 74 | private: |
| 75 | mp_int t; |
| 76 | }; |
| 77 | |
| 78 | } // namespace Firebird |
| 79 |
no outgoing calls
no test coverage detected