MCPcopy Create free account
hub / github.com/ddnet/ddnet / HashPassword

Function HashPassword

src/engine/server/authmanager.cpp:41–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41static MD5_DIGEST HashPassword(const char *pPassword, const unsigned char aSalt[SALT_BYTES])
42{
43 // Hash the password and the salt
44 MD5_CTX Md5;
45 md5_init(&Md5);
46 md5_update(&Md5, (unsigned char *)pPassword, str_length(pPassword));
47 md5_update(&Md5, aSalt, SALT_BYTES);
48 return md5_finish(&Md5);
49}
50
51CAuthManager::CAuthManager()
52{

Callers 3

AddKeyMethod · 0.85
CheckKeyMethod · 0.85
UpdateKeyMethod · 0.85

Calls 4

str_lengthFunction · 0.85
md5_initFunction · 0.50
md5_updateFunction · 0.50
md5_finishFunction · 0.50

Tested by

no test coverage detected