aboutsummaryrefslogtreecommitdiff
path: root/src/common/Cryptography/BigNumber.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-12-26 14:55:15 +0100
committerfunjoker <funjoker109@gmail.com>2024-01-09 12:07:15 +0100
commitb91c2396d50bab56a672faf31d3f8bcfcbd8e708 (patch)
tree6ca75f888dfcbbbe6e5071151b4955fce9d0b71d /src/common/Cryptography/BigNumber.h
parentc431c77d8923d216901287a2d372494242bc7a51 (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.h')
-rw-r--r--src/common/Cryptography/BigNumber.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/Cryptography/BigNumber.h b/src/common/Cryptography/BigNumber.h
index d36c8a9f718..3ec6cc65590 100644
--- a/src/common/Cryptography/BigNumber.h
+++ b/src/common/Cryptography/BigNumber.h
@@ -34,6 +34,7 @@ class TC_COMMON_API BigNumber
BigNumber(uint32 v) : BigNumber() { SetDword(v); }
BigNumber(int32 v) : BigNumber() { SetDword(v); }
BigNumber(std::string const& v) : BigNumber() { SetHexStr(v); }
+ BigNumber(std::vector<uint8> const& v, bool littleEndian = true) : BigNumber() { SetBinary(v.data(), v.size(), littleEndian); }
template <size_t Size>
BigNumber(std::array<uint8, Size> const& v, bool littleEndian = true) : BigNumber() { SetBinary(v.data(), Size, littleEndian); }
@@ -113,6 +114,7 @@ class TC_COMMON_API BigNumber
BigNumber Exp(BigNumber const&) const;
int32 GetNumBytes() const;
+ int32 GetNumBits() const;
struct bignum_st* BN() { return _bn; }
struct bignum_st const* BN() const { return _bn; }