From 623202d68e862b346b22ac65f9dcbb498d2fa2ac Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 26 Dec 2023 14:55:15 +0100 Subject: 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 --- src/common/Cryptography/BigNumber.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/common/Cryptography/BigNumber.cpp') 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); -- cgit v1.2.3