mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Add integrity hash support and SRP tuning options
This commit is contained in:
parent
b3001a4b5b
commit
5435796a98
10 changed files with 591 additions and 22 deletions
|
|
@ -27,6 +27,15 @@ public:
|
|||
const std::vector<uint8_t>& N,
|
||||
const std::vector<uint8_t>& salt);
|
||||
|
||||
// Some SRP implementations use k = H(N|g) instead of the WoW-specific k=3.
|
||||
// Default is false (k=3).
|
||||
void setUseHashedK(bool enabled) { useHashedK_ = enabled; }
|
||||
|
||||
// Controls how SHA1 outputs are interpreted when converted to big integers (x, u, optionally k).
|
||||
// Many SRP implementations treat hash outputs as big-endian integers.
|
||||
// Default is false (treat hash outputs as little-endian integers).
|
||||
void setHashBigEndian(bool enabled) { hashBigEndian_ = enabled; }
|
||||
|
||||
// Get client public ephemeral (A) - send to server
|
||||
std::vector<uint8_t> getA() const;
|
||||
|
||||
|
|
@ -73,6 +82,8 @@ private:
|
|||
std::vector<uint8_t> stored_auth_hash; // Pre-computed SHA1(UPPER(user):UPPER(pass))
|
||||
|
||||
bool initialized = false;
|
||||
bool useHashedK_ = false;
|
||||
bool hashBigEndian_ = false;
|
||||
};
|
||||
|
||||
} // namespace auth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue