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
committerShauren <shauren.trinity@gmail.com>2023-12-26 14:55:15 +0100
commit623202d68e862b346b22ac65f9dcbb498d2fa2ac (patch)
treefd882ea858e1668d2f79c1232ea5c0bf50001488 /src/common/Cryptography/BigNumber.h
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.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; }