aboutsummaryrefslogtreecommitdiff
path: root/src/common/Cryptography/BigNumber.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-12-26 14:55:15 +0100
committerShauren <shauren.trinity@gmail.com>2023-12-26 14:55:15 +0100
commit623202d68e862b346b22ac65f9dcbb498d2fa2ac (patch)
treefd882ea858e1668d2f79c1232ea5c0bf50001488 /src/common/Cryptography/BigNumber.cpp
parent4a61675191c91c7d09def0e612f2e11a646845b0 (diff)
Core/Bnet: Implemented new SRP6 variants, and migrate old sha_pass_hash in battlenet_accounts to separate salt and verifier columns
* passwords can now be case sensitive and up to 128 characters long
Diffstat (limited to 'src/common/Cryptography/BigNumber.cpp')
-rw-r--r--src/common/Cryptography/BigNumber.cpp7
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);