MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / BigInteger

Class BigInteger

src/common/BigInteger.h:39–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37namespace Firebird {
38
39class BigInteger
40{
41public:
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
74private:
75 mp_int t;
76};
77
78} // namespace Firebird
79

Callers 4

RemotePasswordMethod · 0.85
clientSessionKeyMethod · 0.85
serverSessionKeyMethod · 0.85
authenticateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected