Checksum Class Reference

#include <CheckSum.h>

List of all members.

Static Public Member Functions

static int ChecksumData (const void *buffer, const int length)
static void ChecksumDataWithSlots (int *checksumSlots, const int numSlots, const void *buffer, const int length)


Detailed Description

This class handles simple checking of data blocks

Member Function Documentation

static int ChecksumData ( const void *  buffer,
const int  length 
) [static]

Performs a simple and quick checksum of a buffer

Parameters:
buffer the data buffer to checksum
the length of the data buffer in bytes
Returns:
the checksum for the data, the checksum returned is never 0

static void ChecksumDataWithSlots ( int *  checksumSlots,
const int  numSlots,
const void *  buffer,
const int  length 
) [static]

Performs a simple and quick checksum of a buffer using a certain chunk size to generate more than 32 bits of data.

Parameters:
checksumSlots The checksum slots array, this is cumulative so make sure the array is initialise to a known state.
numSlots The number of checksumSlots supplied in the array.
buffer the data buffer to checksum.
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.


Generated on Sat Jun 28 22:02:23 2008 for ReplicaNet and RNLobby by  doxygen 1.5.3