CAccountPassword: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
m (Delete page)
Line 1: Line 1:
__NOTOC__
{{Delete|Moved to https://github.com/multitheftauto/mtasa-blue/wiki/CAccountPassword}}
{{Server devclass}}
 
This class can be found at '''mtasa-blue\MTA10_Server\mods\deathmatch\logic\CAccountPassword.cpp'''.
 
== Valid password types ==
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
 
 
<syntaxhighlight lang="lua">m_strSha256 (64) + m_strType (1) + m_strSalt (32);</syntaxhighlight>
 
* '''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)
 
=== md5 string generation ===
 
When '''m_strType = 1''', the legacy md5 mode is used.
<syntaxhighlight lang="lua">
strMd5 = md5(strPlaintextPassword).UPPERCASE
m_strSha256 = sha256(m_strSalt + strMd5)
</syntaxhighlight>
 
=== sha256 string generation ===
 
When '''m_strType = 0''', the legacy md5 mode is NOT used and the plaintext password has been directly hashed.
<syntaxhighlight lang="lua">
m_strSha256 = sha256(m_strSalt + strPlaintextPassword)
</syntaxhighlight>

Revision as of 18:23, 9 September 2018

Edit-delete.png This page is marked for deletion.

Reason: Moved to https://github.com/multitheftauto/mtasa-blue/wiki/CAccountPassword
Actions: Delete (Administrators) - Discuss - What links here - Category