QuickHash Library API

SL_RIPEMD320_CalculateStrHex

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

Parameters

 pDest

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

 pSrc

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

 bUpper

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

Remarks

Calculates the message digest for the null-terminated string pointed by pSrc. The digest 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_RIPEMD320_HEXDIGESTSIZE characters.

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

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

Example

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

int main()
{
    char string[] = "Test String";
    char digesthex[ SLC_RIPEMD320_HEXDIGESTSIZE ]; /*0 terminated*/

    /*****Calculate the digest********************************/

    SL_RIPEMD320_CalculateStrHex( digesthex, string, 0 );

    /*****Use the digest**************************************/
    /*...*/

    return 0;
}

 

 

RIPEMD320 API Overview   |   RIPEMD320 API Functions   |   Useful Links   |   HashCalc

 

See Also    SL_RIPEMD320_CalculateStr, SL_RIPEMD320_Calculate, SL_RIPEMD320_CalculateHex


 

 

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