|
| cBigInteger () |
|
| cBigInteger (const THIS_t &x) |
|
| cBigInteger (const cBigUnsigned &x, bool bNegative=false) |
|
| cBigInteger (const char *pszStr, RADIX_t uRadix=10) |
|
| cBigInteger (BLOCK_ENUM_t nBlocks, const BLOCK_t *pBlocks, bool bNegative) |
|
| cBigInteger (BLOCK_ENUM_t nBlocks, const BLOCK_t *pBlocks, bool bStatic, bool bNegative) |
|
| cBigInteger (UINTMAX_t x) |
|
| cBigInteger (INTMAX_t x) |
|
| cBigInteger (UINT32 x) |
|
| cBigInteger (INT32 x) |
|
bool | isNegative () const |
|
int | get_Sign () const |
|
const cBigUnsigned & | get_Magnitude () const |
|
COMPARE_t | CompareU (BLOCK_t x) const |
|
COMPARE_t | CompareS (BLOCKI_t x) const |
|
COMPARE_t | Compare (const cBigInteger &x) const |
|
COMPARE_t | CompareMagnitude (const cBigUnsigned &x) const |
|
bool | IsEqual (const THIS_t &x) const |
|
bool | IsEqual (BLOCKI_t x) const |
|
bool | operator== (const THIS_t &x) const |
|
bool | operator!= (const THIS_t &x) const |
|
bool | operator< (const THIS_t &x) const |
|
bool | operator<= (const THIS_t &x) const |
|
bool | operator>= (const THIS_t &x) const |
|
bool | operator> (const THIS_t &x) const |
|
template<typename TYPE > |
TYPE | get_ValS () const |
|
template<typename TYPE > |
TYPE | get_Val () const |
|
StrLen_t | GetStr (char *pszOut, StrLen_t iOutMax, RADIX_t uRadix=10) const |
|
cString | GetStr (RADIX_t uRadix=10) const |
|
bool | SetStr (const char *pszIn, RADIX_t uRadix=10, const char **ppszEnd=nullptr) |
|
HRESULT | SetBinaryBE (const BYTE *pData, size_t nSize, bool bByteSign) |
|
HRESULT | SetBinaryBE (const cMemBlock &b, bool bByteSign) |
|
HRESULT | GetBinaryBE (BYTE *pOut, size_t nSizeOut) const |
|
void | SetCopyInt (const cBigInteger &x) |
|
HRESULT | SetCopySecure (const THIS_t &val, bool assign) |
|
void | operator= (const THIS_t &x) |
|
void | SetZeroAll () |
|
void | SetNullVal () |
|
void | put_ValU (UINTMAX_t n) |
|
void | put_ValS (INTMAX_t n) |
|
template<typename TYPE > |
void | put_Val (TYPE n) |
|
void | SetBlocksStatic (BLOCK_ENUM_t nBlocks, const BLOCK_t *pBlocks) |
|
void | SetBlocksStatic (const cBitArrayStatic &b) |
|
void | OpAdd1 (BLOCKI_t n) |
|
void | OpSubtract1 (BLOCKI_t n) |
|
void | InitAdd (const cBigInteger &a, const cBigInteger &b) |
|
void | InitAddU (const cBigUnsigned &a, const cBigUnsigned &b) |
|
void | InitSubtract (const cBigInteger &a, const cBigInteger &b) |
|
HRESULT | InitSubU (const cBigUnsigned &a, const cBigUnsigned &b) |
|
void | OpSubtract (const THIS_t &b) |
|
HRESULT | OpSubtractU (const cBigUnsigned &a) |
|
void | InitSubtract1 (const THIS_t &a, BLOCKI_t n) |
|
void | InitAdd1 (const THIS_t &a, BLOCKI_t n) |
|
void | InitMultiply (const cBigInteger &a, const cBigInteger &b) |
|
HRESULT | InitDivide (const cBigInteger ÷nd, const cBigInteger &divisor, OUT cBigInteger &remainder) |
|
HRESULT | InitDivide (const THIS_t &a, const cBigInteger &b) |
|
HRESULT | InitModulus (const THIS_t &a, const THIS_t &b) |
|
HRESULT | InitModulusU (const THIS_t &a, const THIS_t &b) |
|
BLOCK_t | GetModulusH (BLOCKH_t b) const |
|
cBigInteger | operator+ (const THIS_t &x) const |
|
cBigInteger | operator- (const THIS_t &x) const |
|
cBigInteger | operator* (const THIS_t &x) const |
|
cBigInteger | operator/ (const THIS_t &x) const |
|
cBigInteger | operator% (const THIS_t &x) const |
|
cBigInteger | operator- () const |
|
void | operator+= (const THIS_t &x) |
|
void | operator-= (const THIS_t &x) |
|
void | operator*= (const THIS_t &x) |
|
void | operator/= (const THIS_t &x) |
|
void | operator%= (const THIS_t &x) |
|
void | CheckNegativeZero () |
|
void | put_Negative (bool b=true) |
|
void | put_Sign (int nSign) |
|
void | FlipSign () |
|
void | operator++ () |
|
void | operator++ (int) |
|
void | operator-- () |
|
void | operator-- (int) |
|
void | InitGreatestCommonDivisor (const cBigInteger &a, const cBigInteger &b) |
|
HRESULT | InitModInv (const cBigInteger &A, const cBigInteger &N) |
|
HRESULT | SetPowerMod (const THIS_t &base, const THIS_t &exponent, const THIS_t &modulus, OUT cBigUnsigned *pRR) |
|
| UNITTEST_FRIEND (cBigInteger) |
|
template<> |
INT64 | get_Val () const |
|
template<> |
void | put_Val (long n) |
|
template<> |
void | put_Val (int n) |
|
template<> |
void | put_Val (short n) |
|
| cBigUnsigned () |
|
| cBigUnsigned (const cBigUnsigned &x) |
|
| cBigUnsigned (BIT_ENUM_t nBits, BLOCK_t uValMask) |
|
| cBigUnsigned (BLOCK_ENUM_t nBlocks, const BLOCK_t *pBlocks) |
|
| cBigUnsigned (BLOCK_ENUM_t nBlocks, const BLOCK_t *pBlocks, bool bStatic) |
|
| cBigUnsigned (const char *pszStr, RADIX_t nBaseRadix=10) |
|
| ~cBigUnsigned () |
|
| cBigUnsigned (UINTMAX_t x) |
|
| cBigUnsigned (INTMAX_t x) |
|
| cBigUnsigned (UINT32 x) |
|
| cBigUnsigned (INT32 x) |
|
void | SetBlockSizeInit (BLOCK_ENUM_t nBlocks, const BLOCK_t *pBlocks) |
|
bool | isZero () const |
|
bool | isOdd () const |
|
template<typename TYPE > |
TYPE | get_ValU () const |
|
template<typename TYPE > |
TYPE | get_ValUC () const |
|
template<typename TYPE > |
TYPE | get_ValS () const |
|
template<typename TYPE > |
TYPE | get_Val () const |
|
COMPARE_t | CompareU (BLOCK_t x) const |
| Compare against primitive type for speed. More...
|
|
bool | operator== (BLOCK_t x) const |
|
bool | operator!= (BLOCK_t x) const |
|
bool | operator< (BLOCK_t x) const |
|
bool | operator<= (BLOCK_t x) const |
|
bool | operator>= (BLOCK_t x) const |
|
bool | operator> (BLOCK_t x) const |
|
COMPARE_t | Compare (const cBigUnsigned &x) const |
| Compares this to x like Perl's <=> More...
|
|
bool | operator== (const cBigUnsigned &x) const |
|
bool | operator!= (const cBigUnsigned &x) const |
|
bool | operator< (const cBigUnsigned &x) const |
|
bool | operator<= (const cBigUnsigned &x) const |
|
bool | operator>= (const cBigUnsigned &x) const |
|
bool | operator> (const cBigUnsigned &x) const |
|
StrLen_t | GetStr (char *pszOut, StrLen_t iOutMax, RADIX_t nBaseRadix=10) const |
|
cString | GetStr (RADIX_t nBaseRadix=10) const |
|
bool | SetStr (const char *pszVal, RADIX_t nBaseRadix=10, const char **ppszEnd=(const char **) nullptr) |
|
void | put_ValU (UINTMAX_t n) |
|
HRESULT | put_ValS (INTMAX_t n) |
|
template<typename TYPE > |
void | put_Val (TYPE n) |
|
void | InitBitAnd (const cBigUnsigned &a, const cBigUnsigned &b) |
|
void | InitBitOr (const cBigUnsigned &a, const cBigUnsigned &b) |
|
void | InitBitXor (const cBigUnsigned &a, const cBigUnsigned &b) |
|
HRESULT | InitBitShiftLeft (const cBigUnsigned &a, int b) |
|
HRESULT | InitBitShiftRight (const cBigUnsigned &a, int b) |
|
void | OpBitShiftLeft1 (BLOCK_t nBitMask=0) |
|
HRESULT | OpBitShiftLeft (BIT_ENUM_t b) |
|
HRESULT | OpBitShiftRight (BIT_ENUM_t b) |
|
void | OpAdd1 (BLOCK_t nVal) |
|
HRESULT | OpSubtract1 (BLOCK_t nVal) |
|
void | InitSubtract1 (const THIS_t &a, BLOCK_t n) |
|
void | InitAdd (const cBigUnsigned &a, const cBigUnsigned &b) |
|
HRESULT | InitSubtract (const cBigUnsigned &a, const cBigUnsigned &b) |
|
HRESULT | OpSubtract (const THIS_t &b) |
|
void | InitMultiply1 (const cBigUnsigned &a, BLOCK_t b) |
|
void | InitMultiplyH (const cBigUnsigned &a, BLOCKH_t b) |
|
void | InitMultiply (const cBigUnsigned &a, const cBigUnsigned &b) |
|
BLOCK_t | GetModulusH (BLOCKH_t b) const |
|
BLOCKH_t | InitDivideH (const cBigUnsigned &a, BLOCKH_t b) |
|
HRESULT | InitDivide (const cBigUnsigned &a, const cBigUnsigned &b, OUT cBigUnsigned &remainder) |
|
HRESULT | InitDivide (const THIS_t &a, const THIS_t &b) |
|
HRESULT | InitModulus (const THIS_t &a, const THIS_t &b) |
|
HRESULT | InitModInv (const cBigUnsigned &A, const cBigUnsigned &N) |
|
HRESULT | SetRandomBits2 (BIT_ENUM_t nBits, IRandomNoise *pRandom=nullptr) |
|
HRESULT | SetRandomBits (BIT_ENUM_t nBits, IRandomNoise *pRandom=nullptr) |
|
BLOCK_t | get_MontgomeryInit () const |
|
void | SetMontMul (THIS_t &rDst, const THIS_t &B, const THIS_t &N, BLOCK_t mm) |
|
void | SetMontRedux (THIS_t &rDst, const THIS_t &N, BLOCK_t mm) |
|
void | SetPower (const THIS_t &base, const THIS_t &exponent) |
|
HRESULT | SetPowerMod (const THIS_t &base, const THIS_t &exponent, const THIS_t &modulus, OUT THIS_t *pRR=nullptr) |
|
BITOP_TYPE | TestPrimeSmall () const |
|
HRESULT | TestPrimeMiller (IRandomNoise *pRandom=nullptr) const |
|
HRESULT | TestPrimeFermat (IRandomNoise *pRandom=nullptr) const |
|
HRESULT | TestPrime (IRandomNoise *pRandom=nullptr) const |
|
HRESULT | SetPrimePrev (IRandomNoise *pRandom=nullptr, cThreadState *pCancel=nullptr) |
|
HRESULT | SetPrimeBits (BIT_ENUM_t nBits, IRandomNoise *pRandom=nullptr, cThreadState *pCancel=nullptr) |
|
HRESULT | SetPrimeBitsDH (BIT_ENUM_t nbits, IRandomNoise *pRandom=nullptr, cThreadState *pCancel=nullptr) |
|
cBigUnsigned | operator+ (const THIS_t &x) const |
| Overloaded return-by-value operators. More...
|
|
cBigUnsigned | operator+ (BLOCK_t x) const |
|
cBigUnsigned | operator- (const THIS_t &x) const |
|
cBigUnsigned | operator- (BLOCK_t x) const |
|
cBigUnsigned | operator* (const THIS_t &x) const |
|
cBigUnsigned | operator* (BLOCKH_t x) const |
|
cBigUnsigned | operator/ (const THIS_t &x) const |
|
cBigUnsigned | operator/ (BLOCKH_t n) const |
|
cBigUnsigned | operator% (const THIS_t &x) const |
|
BLOCKH_t | operator% (BLOCKH_t n) const |
|
cBigUnsigned | operator& (const THIS_t &x) const |
|
cBigUnsigned | operator| (const THIS_t &x) const |
|
cBigUnsigned | operator^ (const THIS_t &x) const |
|
cBigUnsigned | operator<< (int b) const |
|
cBigUnsigned | operator>> (int b) const |
|
void | operator+= (const THIS_t &x) |
|
void | operator+= (BLOCK_t x) |
|
void | operator-= (const THIS_t &x) |
|
void | operator-= (BLOCK_t x) |
|
void | operator*= (const THIS_t &x) |
|
void | operator*= (BLOCKH_t x) |
|
void | operator/= (const THIS_t &x) |
|
void | operator/= (BLOCKH_t n) |
|
void | operator%= (const THIS_t &x) |
|
void | operator%= (BLOCKH_t n) |
|
void | operator&= (const THIS_t &x) |
|
void | operator|= (const THIS_t &x) |
|
void | operator^= (const THIS_t &x) |
|
void | operator<<= (int b) |
|
void | operator>>= (int b) |
|
void | operator++ () |
|
void | operator++ (int) |
|
void | operator-- () |
|
void | operator-- (int) |
|
| UNITTEST_FRIEND (cBigUnsigned) |
|
template<> |
long | get_Val () const |
| overloads to get signed value correctly. More...
|
|
template<> |
void | put_Val (long n) |
|
template<> |
void | put_Val (int n) |
|
template<> |
void | put_Val (short n) |
|
bool | isHighBlockUseExact () const |
|
bool | isHighBlockUseValid () const |
|
BLOCK_ENUM_t | get_BlocksUse () const |
|
void | UpdateBlocksUse () |
|
void | UpdateBlocksUseMax (BLOCK_ENUM_t nBlocksUseMax) |
|
void | UpdateBlocksUseCap () |
|
BLOCK_t & | RefBlock (BLOCK_ENUM_t nBlock) |
|
| cBitArray () |
|
| cBitArray (BIT_ENUM_t nBits) |
|
| cBitArray (BIT_ENUM_t nBits, BLOCK_t uValueMask) |
|
| cBitArray (BLOCK_ENUM_t nBlocks, const BLOCK_t *pBlocks) |
|
| cBitArray (BLOCK_ENUM_t nBlocks, const BLOCK_t *pBlocks, bool bStatic) |
|
| ~cBitArray () |
|
void | SetBlocksStatic (BLOCK_ENUM_t nBlocks, const BLOCK_t *pBlocks) |
|
void | SetBlocksStatic (const cBitArrayStatic &b) |
|
HRESULT | SetBlockSizeGrow (BLOCK_ENUM_t nBlocksNew) |
|
HRESULT | SetBlockSizeShrink (BLOCK_ENUM_t nBlocksNew) |
|
void | SetBlockSizeUse (BLOCK_ENUM_t nBlocksNew) |
|
bool | IsEqual (const THIS_t &x) const |
|
bool | IsEqualU (BLOCK_t x) const |
|
bool | operator== (const THIS_t &x) const |
|
bool | operator!= (const THIS_t &x) const |
|
bool | isEmptyBits () const |
|
bool | IsSet (BIT_ENUM_t nBit) const |
|
BIT_ENUM_t | get_Lowest1Bit () const |
|
BIT_ENUM_t | get_Highest1Bit () const |
|
BIT_ENUM_t | get_Count1Bits () const |
|
void | SetBit (BIT_ENUM_t nBit) |
|
void | ClrBit (BIT_ENUM_t nBit) |
|
void | ModBit (BIT_ENUM_t nBit, bool bVal) |
|
void | SetTruncateBits (BIT_ENUM_t nBits) |
|
HRESULT | SetRandomBits (BIT_ENUM_t nBits, IRandomNoise *pRandom=nullptr) |
|
HRESULT | SetRandomBitsLarge (BIT_ENUM_t nBits, IRandomNoise *pRandom=nullptr) |
|
void | SetCopyBits (const THIS_t &ref) |
|
HRESULT | SetCopySecure (const THIS_t &val, bool assign) |
|
void | SetZeroAll () |
|
void | SetNullVal () |
|
size_t | get_BinarySize () const |
|
HRESULT | GetBinaryBE (BYTE *pOut, size_t nSizeOut) const |
|
HRESULT | GetBinaryBE (cHeapBlock &b) const |
|
HRESULT | SetBinaryBE (const BYTE *pData, size_t nSize) |
|
HRESULT | SetBinaryLE (const BYTE *pData, size_t nSize) |
|
| UNITTEST_FRIEND (cBitArray) |
|
| cBitArrayStatic () noexcept |
|
| cBitArrayStatic (BIT_ENUM_t nBits) |
|
| cBitArrayStatic (BIT_ENUM_t nBits, BLOCK_t uValueMask) |
|
| cBitArrayStatic (BLOCK_ENUM_t nBlocks, const BLOCK_t *pData) |
|
| cBitArrayStatic (BLOCK_ENUM_t nBlocks, const BLOCK_t *pBlocksInit, bool bStatic) |
|
| cBitArrayStatic (const THIS_t &ref) |
|
| cBitArrayStatic (THIS_t &&ref) noexcept |
|
| ~cBitArrayStatic () |
|
bool | isNullVal () const noexcept |
|
bool | isZeroVal () const noexcept |
|
BLOCK_ENUM_t | get_BlocksCap () const noexcept |
|
size_t | get_BytesCap () const noexcept |
|
BLOCK_t | GetBlockInt (BLOCK_ENUM_t i) const |
|
const BLOCK_t * | get_BlockPtrC () const noexcept |
|
BLOCK_t * | get_BlockPtr () |
|
BLOCK_t & | RefBlockInt (BLOCK_ENUM_t i) |
|
UINT32 | GetU32Int (BLOCK_ENUM_t j) const |
|
void | SetU32Int (BLOCK_ENUM_t j, UINT32 val32) |
|
const THIS_t & | operator= (const THIS_t &ref) |
|
THIS_t & | operator= (THIS_t &&ref) |
|
bool | isStatic () const noexcept |
|
void | SetBlocksStatic (BLOCK_ENUM_t nBlocks, const BLOCK_t *pBlocks) |
|
bool | isReadOnly () const noexcept |
|
BIT_ENUM_t | get_BitsCap () const noexcept |
|
bool | IsValidBit (BIT_ENUM_t nBit) const noexcept |
|
bool | IsSet (BIT_ENUM_t nBit) const |
|
bool | isOdd () const |
|
void | ClrBit (BIT_ENUM_t nBit) |
|
void | SetBit (BIT_ENUM_t nBit) |
|
bool | SetBitRet (BIT_ENUM_t nBit) |
|
void | ModBit (BIT_ENUM_t nBit, bool bVal) |
|
void | SetNullVal () noexcept |
|
void | SetZeroAll () |
|
void | SetAll1 () |
|
void | SetBitsSizeZ (BIT_ENUM_t nBits) |
|
void | SetInvertBytes (size_t nSize) |
|
void | SetCopyBits (const THIS_t &ref) |
|