|
QuickHash Library |
API |
|
SL_CRC16_CalculateStr
void SL_HASHCALL SL_CRC16_CalculateStr( void*
pDest, const char* pSrc );
Parameters
pDest
[out] Pointer to the memory
buffer that will receive the checksum.
pSrc
[in] Pointer to the
null-terminated string for which to calculate the checksum.
Remarks
Calculates the checksum for the
null-terminated string
pointed by pSrc. The checksum is retrieved in the memory buffer pointed by
pDest. The size of the memory buffer pointed by pDest must be at
least SLC_CRC16_DIGESTSIZE bytes.
Note. The call SL_CRC16_CalculateStr(
pDest, pSrc );
is equivalent to the call
SL_CRC16_Calculate(
pDest,
pSrc, strlen( pSrc ) );
Example
#include <string.h>
#include <QuickHash.h>
int main()
{
char string[] = "Test String";
unsigned char checksum[ SLC_CRC16_DIGESTSIZE ];
/*****Calculate the checksum**********************************/
SL_CRC16_CalculateStr( checksum, string );
/*****Use the checksum**************************************/
/*...*/
return 0;
}
|
|
CRC16 API Overview
| CRC16 API_Functions
|
Useful Links | HashCalc
See Also
SL_CRC16_CalculateStrHex,
SL_CRC16_Calculate,
SL_CRC16_CalculateHex
|