diff options
Diffstat (limited to 'src/common/Cryptography/BigNumber.cpp')
-rw-r--r-- | src/common/Cryptography/BigNumber.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/Cryptography/BigNumber.cpp b/src/common/Cryptography/BigNumber.cpp index b9f6a1c947c..f220ca319be 100644 --- a/src/common/Cryptography/BigNumber.cpp +++ b/src/common/Cryptography/BigNumber.cpp @@ -120,7 +120,7 @@ BigNumber& BigNumber::operator%=(BigNumber const& bn) BN_CTX *bnctx; bnctx = BN_CTX_new(); - BN_mod(_bn, _bn, bn._bn, bnctx); + BN_nnmod(_bn, _bn, bn._bn, bnctx); BN_CTX_free(bnctx); return *this; @@ -166,6 +166,11 @@ int32 BigNumber::GetNumBytes() const return BN_num_bytes(_bn); } +int32 BigNumber::GetNumBits() const +{ + return BN_num_bits(_bn); +} + uint32 BigNumber::AsDword() const { return (uint32)BN_get_word(_bn); |