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

Method UpdateKey

src/engine/server/authmanager.cpp:188–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188void CAuthManager::UpdateKey(int Slot, const char *pPw, const char *pRoleName)
189{
190 if(Slot < 0 || Slot >= (int)m_vKeys.size())
191 return;
192
193 // Generate random salt
194 unsigned char aSalt[SALT_BYTES];
195 secure_random_fill(aSalt, SALT_BYTES);
196 UpdateKeyHash(Slot, HashPassword(pPw, aSalt), aSalt, pRoleName);
197}
198
199void CAuthManager::ListKeys(FListCallback pfnListCallback, void *pUser)
200{

Callers 2

ConAuthUpdateMethod · 0.80

Calls 2

secure_random_fillFunction · 0.85
HashPasswordFunction · 0.85

Tested by

no test coverage detected