Documentation

ServerVerificationUtils.php

Table of Contents

Functions

serverVerificationHash()  : int
This hash function is used by the game client to verify communication with a genuine server during connection initialization.
_mod()  : int
Performs a modulus operation, considering negative adjustments.

Functions

serverVerificationHash()

This hash function is used by the game client to verify communication with a genuine server during connection initialization.

serverVerificationHash(int $challenge) : int
Parameters
$challenge : int

The challenge value sent by the client. Should be no larger than 11,092,110.

Tags
remarks

The client sends an integer value to the server in the INIT_INIT client packet, where it is referred to as the challenge. The server hashes the value and sends the hash back in the INIT_INIT server packet. The client hashes the value and compares it to the hash sent by the server. If the hashes don't match, the client drops the connection.

warning

Oversized challenges may result in negative hash values, which cannot be represented properly in the EO protocol.

Return values
int

The hashed challenge value.

_mod()

Performs a modulus operation, considering negative adjustments.

_mod(int $a, int $b) : int
Parameters
$a : int

The dividend.

$b : int

The divisor.

Return values
int

The result of the modulus operation.


        
On this page

Search results