ReplicaNet and RNLobby
1
|
#include <CheckSum.h>
Static Public Member Functions | |
static int | ChecksumData (const void *buffer, const size_t length) |
static void | ChecksumDataWithSlots (int *checksumSlots, const size_t numSlots, const void *buffer, const size_t length, const bool initialiseSlots=false, const bool initialiseSlotsWithLength=false) |
This class handles simple checking of data blocks
|
static |
Performs a simple and quick checksum of a buffer
buffer | the data buffer to checksum |
the | length of the data buffer in bytes |
|
static |
Performs a simple and quick checksum of a buffer using a certain chunk size to generate more than 32 bits of data.
checksumSlots | The checksum slots array. By default this is cumulative so make sure the array is initialised to a known state. |
numSlots | The number of checksumSlots supplied in the array. |
buffer | The data buffer to checksum. |
length | The length of the data buffer in bytes. When using the cumulative feature of this function the number of bytes must be a multiple of numSlots except for the last use of this function for a particular block of data. By default the checksumSlots are not initialised. Setting this to be true will initialise the checksumSlots. By default the length of the data is not used to seed the checksumSlots when calculating the checksum. If this is true then the length will be used to seed the checksumSlots and this will alter the result of any cumulative checksum. |