QuickHash Library API


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



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


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


    [in] Length in bytes of the memory block.


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


Calculates the message digest for the memory block 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_MD2_HEXDIGESTSIZE characters.


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

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

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

    SL_MD2_CalculateHex( digesthex, string, strlen( string ), 0 );

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

    return 0;



MD2 API Overview   |   MD2 API Functions   |   Useful Links   |   HashCalc


See Also    SL_MD2_Calculate, SL_MD2_CalculateStr, SL_MD2_CalculateStrHex



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