mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Store password hash instead of plaintext for login persistence
Save SHA1(UPPER(user):UPPER(pass)) hash to login.cfg instead of the plaintext password. On subsequent logins, use the stored hash directly with a new authenticateWithHash() method that bypasses password hashing. The password field shows a placeholder when using a stored hash.
This commit is contained in:
parent
de8c195eaf
commit
669d89c108
6 changed files with 107 additions and 4 deletions
|
|
@ -57,6 +57,11 @@ private:
|
|||
float authTimer = 0.0f; // Timeout tracker
|
||||
static constexpr float AUTH_TIMEOUT = 10.0f;
|
||||
|
||||
// Saved password hash (SHA1(UPPER(user):UPPER(pass)) as hex)
|
||||
std::string savedPasswordHash;
|
||||
bool usingStoredHash = false;
|
||||
static constexpr const char* PASSWORD_PLACEHOLDER = "\x01\x01\x01\x01\x01\x01\x01\x01";
|
||||
|
||||
// Callbacks
|
||||
std::function<void()> onSuccess;
|
||||
std::function<void()> onSinglePlayer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue