diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-12-26 14:55:15 +0100 |
---|---|---|
committer | funjoker <funjoker109@gmail.com> | 2024-01-09 12:07:15 +0100 |
commit | b91c2396d50bab56a672faf31d3f8bcfcbd8e708 (patch) | |
tree | 6ca75f888dfcbbbe6e5071151b4955fce9d0b71d /src/common/Cryptography/BigNumber.cpp | |
parent | c431c77d8923d216901287a2d372494242bc7a51 (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
(cherry picked from commit 623202d68e862b346b22ac65f9dcbb498d2fa2ac)
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); |