![]() |
TrinityCore
|
#include <BigNumber.h>
Public Member Functions | |
| BigNumber () | |
| BigNumber (BigNumber const &bn) | |
| BigNumber (uint32 v) | |
| BigNumber (int32 v) | |
| BigNumber (std::string const &v) | |
| template<BigNumberBinaryInput Container> | |
| BigNumber (Container const &binary, bool littleEndian=true) | |
| ~BigNumber () | |
| void | SetDword (int32) |
| void | SetDword (uint32) |
| void | SetQword (uint64) |
| void | SetBinary (uint8 const *bytes, int32 len, bool littleEndian=true) |
| template<BigNumberBinaryInput Container> | |
| void | SetBinary (Container const &binary, bool littleEndian=true) |
| bool | SetDecStr (char const *str) |
| bool | SetDecStr (std::string const &str) |
| bool | SetHexStr (char const *str) |
| bool | SetHexStr (std::string const &str) |
| void | SetRand (int32 numbits) |
| BigNumber & | operator= (BigNumber const &bn) |
| BigNumber & | operator+= (BigNumber const &bn) |
| BigNumber | operator+ (BigNumber const &bn) const |
| BigNumber & | operator-= (BigNumber const &bn) |
| BigNumber | operator- (BigNumber const &bn) const |
| BigNumber & | operator*= (BigNumber const &bn) |
| BigNumber | operator* (BigNumber const &bn) const |
| BigNumber & | operator/= (BigNumber const &bn) |
| BigNumber | operator/ (BigNumber const &bn) const |
| BigNumber & | operator%= (BigNumber const &bn) |
| BigNumber | operator% (BigNumber const &bn) const |
| BigNumber & | operator<<= (int n) |
| BigNumber | operator<< (int n) const |
| int32 | CompareTo (BigNumber const &bn) const |
| bool | operator== (BigNumber const &bn) const |
| std::strong_ordering | operator<=> (BigNumber const &other) const |
| bool | IsZero () const |
| bool | IsNegative () const |
| BigNumber | ModExp (BigNumber const &bn1, BigNumber const &bn2) const |
| BigNumber | Exp (BigNumber const &) const |
| int32 | GetNumBytes () const |
| int32 | GetNumBits () const |
| struct bignum_st * | BN () |
| struct bignum_st const * | BN () const |
| uint32 | AsDword () const |
| void | GetBytes (uint8 *buf, size_t bufsize, bool littleEndian=true) const |
| std::vector< uint8 > | ToByteVector (int32 minSize=0, bool littleEndian=true) const |
| template<std::size_t Size> | |
| std::array< uint8, Size > | ToByteArray (bool littleEndian=true) const |
| std::string | AsHexStr () const |
| std::string | AsDecStr () const |
Private Attributes | |
| struct bignum_st * | _bn |
Definition at line 34 of file BigNumber.h.
| BigNumber::BigNumber | ( | ) |
Definition at line 24 of file BigNumber.cpp.
| BigNumber::BigNumber | ( | BigNumber const & | bn | ) |
Definition at line 28 of file BigNumber.cpp.
|
inline |
Definition at line 39 of file BigNumber.h.
|
inline |
Definition at line 40 of file BigNumber.h.
|
inline |
Definition at line 41 of file BigNumber.h.
|
inline |
Definition at line 43 of file BigNumber.h.
| BigNumber::~BigNumber | ( | ) |
Definition at line 32 of file BigNumber.cpp.
| std::string BigNumber::AsDecStr | ( | ) | const |
Definition at line 218 of file BigNumber.cpp.
| uint32 BigNumber::AsDword | ( | ) | const |
Definition at line 180 of file BigNumber.cpp.
| std::string BigNumber::AsHexStr | ( | ) | const |
Definition at line 210 of file BigNumber.cpp.
|
inline |
Definition at line 125 of file BigNumber.h.
|
inline |
Definition at line 126 of file BigNumber.h.
Definition at line 141 of file BigNumber.cpp.
Definition at line 146 of file BigNumber.cpp.
| void BigNumber::GetBytes | ( | uint8 * | buf, |
| size_t | bufsize, | ||
| bool | littleEndian = true |
||
| ) | const |
| int32 BigNumber::GetNumBits | ( | ) | const |
| int32 BigNumber::GetNumBytes | ( | ) | const |
| bool BigNumber::IsNegative | ( | ) | const |
Definition at line 190 of file BigNumber.cpp.
| bool BigNumber::IsZero | ( | ) | const |
Definition at line 185 of file BigNumber.cpp.
Definition at line 91 of file BigNumber.h.
Definition at line 124 of file BigNumber.cpp.
Definition at line 77 of file BigNumber.h.
Definition at line 102 of file BigNumber.cpp.
Definition at line 63 of file BigNumber.h.
Definition at line 90 of file BigNumber.cpp.
Definition at line 70 of file BigNumber.h.
Definition at line 96 of file BigNumber.cpp.
Definition at line 84 of file BigNumber.h.
Definition at line 113 of file BigNumber.cpp.
|
inline |
Definition at line 98 of file BigNumber.h.
| BigNumber & BigNumber::operator<<= | ( | int | n | ) |
Definition at line 135 of file BigNumber.cpp.
|
inline |
Definition at line 106 of file BigNumber.h.
Definition at line 81 of file BigNumber.cpp.
|
inline |
Definition at line 105 of file BigNumber.h.
|
inline |
Definition at line 52 of file BigNumber.h.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 56 of file BigNumber.cpp.
| bool BigNumber::SetDecStr | ( | char const * | str | ) |
|
inline |
Definition at line 54 of file BigNumber.h.
Here is the call graph for this function:
Here is the caller graph for this function:| void BigNumber::SetDword | ( | int32 | val | ) |
Definition at line 37 of file BigNumber.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void BigNumber::SetDword | ( | uint32 | val | ) |
Definition at line 44 of file BigNumber.cpp.
| bool BigNumber::SetHexStr | ( | char const * | str | ) |
|
inline |
Definition at line 56 of file BigNumber.h.
Here is the call graph for this function:
Here is the caller graph for this function:| void BigNumber::SetQword | ( | uint64 | val | ) |
Definition at line 49 of file BigNumber.cpp.
| void BigNumber::SetRand | ( | int32 | numbits | ) |
|
inline |
Definition at line 201 of file BigNumber.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 145 of file BigNumber.h.