QuickHash Library API

SL_ADLER32_Calculate

void SL_HASHCALL SL_ADLER32_Calculate( void* pDest, const void* pSrc, unsigned int nSrcLength );
 

Parameters

 pDest

    [out] Pointer to the memory buffer that will receive the checksum.

 pSrc

    [in] Pointer to the continuous memory block for which to calculate the checksum.

 nSrcLength

    [in] Length in bytes of the memory block. 

Remarks

Calculates the checksum for the memory block 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_ADLER32_DIGESTSIZE bytes. 

Example

#include <string.h>
#include <QuickHash.h>

int main()
{
    char string[] = "Test String";
    unsigned char checksum[ SLC_ADLER32_DIGESTSIZE ];

    /*****Calculate the checksum********************************/

    SL_ADLER32_Calculate( checksum, string, strlen( string ) );

    /*****Use the checksum**************************************/
    /*...*/

    return 0;
}

 

 

ADLER32 API Overview   |   ADLER32 API_Functions   |   Useful Links   |   HashCalc

 

See Also    SL_ADLER32_CalculateHex, SL_ADLER32_CalculateStr, SL_ADLER32_CalculateStrHex


 

 

Send Feedback to SlavaSoft Inc. Tell a friend about QuickHash Library