static unsigned long Calculate( const unsigned
char* pSrc, unsigned int nSrcLength );
static unsigned long Calculate( const char*
static int Calculate( unsigned long* pCRC,
const char* pFileName );
In the first case - pointer to the
continuous memory block for which to calculate the checksum.
In the second case - pointer to the
null-terminated string for which to calculate the checksum.
[in] Length in bytes
of the memory block.
[out] Pointer to the
variable that will receive the checksum.
[in] Pointer to the
null-terminated string specifying the name of the file for which to calculate
Calculates and returns the checksum for the memory block
pointed by pSrc.
Calculates and returns the checksum for the
null-terminated string pointed by pSrc.
Calculates the checksum for the file pointed
by pFileName. The checksum is retrieved in the variable
pointed by pCRC.
Zero if calculation is successful, otherwise nonzero.
using namespace FastCRC;
char mydata = "Test String";
//Calculate and retrieve the checksum
unsigned long checksum = CFastCRC16::Calculate( (const unsigned char*)mydata, strlen( mydata ) );
//Use the checksum
In the above example mydata is
a null-terminated string. Therefore, the call
(const unsigned char*)mydata, strlen(
mydata ) );
can be replaced by
CFastCRC16::Calculate( mydata );
| Class Members
Useful Links | HashCalc