-
-
Notifications
You must be signed in to change notification settings - Fork 437
CAccountPassword
Qais Patankar edited this page May 1, 2019
·
2 revisions
Server/mods/deathmatch/logic/CAccountPassword.cpp
There are two different supported password types right now:
- md5: directly stores the md5 hash of the password (deprecated)
- sha256: stores the sha256 hash, the type of password, and the salt
m_strSha256 (64) + m_strType (1) + m_strSalt (32);
- m_strSha256: generated string (64 characters; 00-64)
- m_strType: differentiates between password type (1 character; 65th character)
- m_strSalt: regular salt (32 characters; 66-97)
When m_strType == 1
, the legacy md5 mode is used.
strMd5 = md5(strPlaintextPassword).UPPERCASE
m_strSha256 = sha256(m_strSalt + strMd5)
When m_strType == 0
, the legacy md5 mode is NOT used and the plaintext password has been directly hashed.
m_strSha256 = sha256(m_strSalt + strPlaintextPassword)
Authors: qaisjp
Project Management
Git cheat sheet
Release Checklist
Code Review
Documentation
Contributors Guide
Style Guide
Lua API
Dev Tips
BitStream
CAccountPassword
Debug Settings
General
Testing Lua
Dependencies
MTADiag
Future Planning
CEF Versions
Windows XP Support
Things for 1.6