QuickHash Library API


void SL_HASHCALL SL_ADLER32_CalculateStrHex( void* pDest, const char* pSrc, int bUpper );



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


    [in] Pointer to the null-terminated string for which to calculate the checksum.


    [in] Uppercase flag. If bUpper is 0, the received message digest represents a lowercase string, otherwise it represents an uppercase string.


Calculates the checksum for the null-terminated string pointed by pSrc. The checksum is retrieved as a null-terminated hexadecimal string in the text buffer pointed by pDest. The size of the text buffer pointed by pDest must be at least SLC_ADLER32_HEXDIGESTSIZE characters.

Note. The call SL_ADLER32_CalculateStrHex( pDest, pSrc, bUpper );

            is equivalent to the call SL_ADLER32_CalculateHex( pDest, pSrc, strlen( pSrc ), bUpper );


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

int main()
    char string[] = "Test String";
    char checksumhex[ SLC_ADLER32_HEXDIGESTSIZE ]; /*0 terminated*/

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

    SL_ADLER32_CalculateStrHex( checksumhex, string, 0 );

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

    return 0;



ADLER32 API Overview   |   ADLER32 API Functions   |   Useful Links   |   HashCalc


See Also    SL_ADLER32_CalculateStr, SL_ADLER32_Calculate, SL_ADLER32_CalculateHex



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