1#ifndef ENGINE_SERVER_AUTHMANAGER_H
2#define ENGINE_SERVER_AUTHMANAGER_H
26 typedef void (*
FListCallback)(
const char *pIdent,
int Level,
void *pUser);
32 int AddKey(
const char *pIdent,
const char *pPw,
int AuthLevel);
34 int FindKey(
const char *pIdent)
const;
35 bool CheckKey(
int Slot,
const char *pPw)
const;
38 const char *
KeyIdent(
int Slot)
const;
40 void UpdateKey(
int Slot,
const char *pPw,
int AuthLevel);
#define SALT_BYTES
Definition: authmanager.h:8
Definition: authmanager.h:11
int AddKey(const char *pIdent, const char *pPw, int AuthLevel)
Definition: authmanager.cpp:61
void ListKeys(FListCallback pfnListCallbac, void *pUser)
Definition: authmanager.cpp:145
const char * KeyIdent(int Slot) const
Definition: authmanager.cpp:116
bool IsGenerated() const
Definition: authmanager.cpp:163
int m_aDefault[3]
Definition: authmanager.h:22
int KeyLevel(int Slot) const
Definition: authmanager.cpp:109
void RemoveKey(int Slot)
Definition: authmanager.cpp:69
void UpdateKeyHash(int Slot, MD5_DIGEST Hash, const unsigned char *pSalt, int AuthLevel)
Definition: authmanager.cpp:123
void AddDefaultKey(int Level, const char *pPw)
Definition: authmanager.cpp:151
int DefaultKey(int AuthLevel) const
Definition: authmanager.cpp:102
CAuthManager()
Definition: authmanager.cpp:21
void Init()
Definition: authmanager.cpp:29
void UpdateKey(int Slot, const char *pPw, int AuthLevel)
Definition: authmanager.cpp:134
void(* FListCallback)(const char *pIdent, int Level, void *pUser)
Definition: authmanager.h:26
std::vector< CKey > m_vKeys
Definition: authmanager.h:20
int NumNonDefaultKeys() const
Definition: authmanager.cpp:168
bool m_Generated
Definition: authmanager.h:23
bool CheckKey(int Slot, const char *pPw) const
Definition: authmanager.cpp:95
int AddKeyHash(const char *pIdent, MD5_DIGEST Hash, const unsigned char *pSalt, int AuthLevel)
Definition: authmanager.cpp:46
int FindKey(const char *pIdent) const
Definition: authmanager.cpp:86
Definition: authmanager.h:14
unsigned char m_aSalt[8]
Definition: authmanager.h:17
int m_Level
Definition: authmanager.h:18
MD5_DIGEST m_Pw
Definition: authmanager.h:16
char m_aIdent[64]
Definition: authmanager.h:15