Unit EOLib.Encrypt
Description
Utilities to handle EO data encryption.
Overview
Functions and Procedures
procedure Interleave(var Data: TArray<Byte>); |
procedure Deinterleave(var Data: TArray<Byte>); |
procedure FlipMsb(var Data: TArray<Byte>); |
procedure SwapMultiples(var Data: TArray<Byte>; Multiple: Cardinal); |
function ServerVerificationHash(Challenge: Cardinal): Integer; |
Description
Functions and Procedures
procedure Interleave(var Data: TArray<Byte>); |
Interleaves a sequence of bytes. When encrypting EO data, bytes are "woven" into each other. Example: [0, 1, 2, 3, 4, 5] → [0, 5, 1, 4, 2, 3]
This is an in-place operation. Parameters
|
procedure Deinterleave(var Data: TArray<Byte>); |
Deinterleaves a sequence of bytes. This is the reverse of Interleave. Example: [0, 1, 2, 3, 4, 5] → [0, 2, 4, 5, 3, 1]
This is an in-place operation. Parameters
|
procedure FlipMsb(var Data: TArray<Byte>); |
Flips the most significant bits of each byte in a sequence of bytes. (Values Example: [0, 1, 127, 128, 129, 254, 255] → [0, 129, 255, 128, 1, 126, 127]
This is an in-place operation. Parameters
|
procedure SwapMultiples(var Data: TArray<Byte>; Multiple: Cardinal); |
Swaps the order of contiguous bytes in a sequence of bytes that are divisible by a given multiple value. Example: Multiple := 3 [10, 21, 27] → [10, 27, 21]
This is an in-place operation.
Parameters
|
function ServerVerificationHash(Challenge: Cardinal): Integer; |
This hash function is how the game client checks that it's communicating with a genuine server during connection initialization.
Parameters
ReturnsThe hashed challenge value |
Generated by PasDoc 0.16.0-snapshot.