aboutsummaryrefslogtreecommitdiff
path: root/src/common/Cryptography/BigNumber.h
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2020-07-29 00:07:41 +0200
committerGitHub <noreply@github.com>2020-07-29 00:07:41 +0200
commit7f7fa8b23d71297f75ff4ca3c1d6e38333a5cc76 (patch)
tree18a47372b2ac3e086e0e96074562af6a1172b223 /src/common/Cryptography/BigNumber.h
parent210f552ac56979430f1349006c1945b29883a2bc (diff)
Core/Authserver: Split SRP6 into its own file (PR #25131)
Diffstat (limited to 'src/common/Cryptography/BigNumber.h')
-rw-r--r--src/common/Cryptography/BigNumber.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/Cryptography/BigNumber.h b/src/common/Cryptography/BigNumber.h
index f269a813075..e61a8073c31 100644
--- a/src/common/Cryptography/BigNumber.h
+++ b/src/common/Cryptography/BigNumber.h
@@ -32,12 +32,14 @@ class TC_COMMON_API BigNumber
BigNumber();
BigNumber(BigNumber const& bn);
BigNumber(uint32 v) : BigNumber() { SetDword(v); }
+ BigNumber(int32 v) : BigNumber() { SetDword(v); }
BigNumber(std::string const& v) : BigNumber() { SetHexStr(v); }
template <size_t Size>
BigNumber(std::array<uint8, Size> const& v, bool littleEndian = true) : BigNumber() { SetBinary(v.data(), Size, littleEndian); }
~BigNumber();
+ void SetDword(int32);
void SetDword(uint32);
void SetQword(uint64);
void SetBinary(uint8 const* bytes, int32 len, bool littleEndian = true);
@@ -107,7 +109,8 @@ class TC_COMMON_API BigNumber
int32 GetNumBytes() const;
- struct bignum_st *BN() { return _bn; }
+ struct bignum_st* BN() { return _bn; }
+ struct bignum_st const* BN() const { return _bn; }
uint32 AsDword() const;
@@ -126,7 +129,7 @@ class TC_COMMON_API BigNumber
std::string AsDecStr() const;
private:
- struct bignum_st *_bn;
+ struct bignum_st* _bn;
};
#endif