iw4x-client/src/Components/Modules/Auth.hpp

36 lines
527 B
C++
Raw Normal View History

2016-02-21 13:57:56 -05:00
namespace Components
{
class Auth : public Component
{
public:
Auth();
~Auth();
const char* GetName() { return "Auth"; };
private:
enum AuthState
{
STATE_UNKNOWN,
STATE_NEGOTIATING,
STATE_VALID,
STATE_INVALID,
};
struct AuthInfo
{
Utils::Cryptography::ECDSA::Key publicKey;
std::string challenge;
AuthState state;
int time;
};
static AuthInfo ClientAuthInfo[18];
static void Frame();
static void RegisterClient(int clientNum);
static void RegisterClientStub();
};
}