eolib-cpp 0.1.0-beta.7
Core C++ library for writing Endless Online applications
Loading...
Searching...
No Matches
eolib::encrypt::ServerVerifier Class Reference

Server verification, as performed during the connection handshake. More...

#include <eolib/encrypt/server_verifier.hpp>

Public Member Functions

 ServerVerifier ()=delete

Static Public Member Functions

static int Hash (int challenge) noexcept
 Hashes a challenge value sent by the client, producing the response expected from a genuine server.

Detailed Description

Server verification, as performed during the connection handshake.

Constructor & Destructor Documentation

◆ ServerVerifier()

eolib::encrypt::ServerVerifier::ServerVerifier ( )
delete

Member Function Documentation

◆ Hash()

int eolib::encrypt::ServerVerifier::Hash ( int challenge)
staticnoexcept

Hashes a challenge value sent by the client, producing the response expected from a genuine server.

The client sends the challenge in the InitInitClientPacket, and the server responds with the hash in the InitInitServerPacket.

Parameters
challengethe challenge value; should be no larger than 11,092,110, since larger values may produce negative hashes that can't be represented in the EO protocol.
Returns
the hashed challenge value.