1 #ifndef _SECP256K1_NUM_OPENSSL_
2 #define _SECP256K1_NUM_OPENSSL_
5 #include <openssl/bn.h>
12 Number(const Number &x);
14 operator const BIGNUM*() const;
19 Number(const unsigned char *bin, int len);
20 void SetNumber(const Number &x);
21 Number &operator=(const Number &x);
22 void SetBytes(const unsigned char *bin, int len);
23 void GetBytes(unsigned char *bin, int len);
25 void SetModInverse(const Number &x, const Number &m);
26 void SetModMul(const Number &a, const Number &b, const Number &m);
27 void SetAdd(const Number &a1, const Number &a2);
28 void SetSub(const Number &a1, const Number &a2);
29 void SetMult(const Number &a1, const Number &a2);
30 void SetDiv(const Number &a1, const Number &a2);
31 void SetMod(const Number &a, const Number &m);
32 int Compare(const Number &a) const;
34 int ShiftLowBits(int bits);
38 bool CheckBit(int pos) const;
42 void SetHex(const std::string &str);
43 void SetPseudoRand(const Number &max);
44 void SplitInto(int bits, Number &low, Number &high) const;
45 std::string ToString() const;