| QuickHash Library | C++ Interface |
|
CMD5::Calculate
static void Calculate( unsigned char* pDest, const unsigned char* pSrc, unsigned int nSrcLength );
static void Calculate( unsigned char*
pDest, const char* pSrc );
Parameters
pDest
[out] Pointer to the memory buffer that will receive the message digest.
pSrc
[in]
In the first case - pointer to the continuous memory block for which to calculate the message digest.
In the second case - pointer to the null-terminated string for which to calculate the message digest.
nSrcLength
[in] Length in bytes of the memory block.
Remarks
static void Calculate( unsigned char* pDest, const unsigned char* pSrc, unsigned int nSrcLength );
Calculates the message digest for the memory block pointed by pSrc.
static void Calculate( unsigned char* pDest, const char* pSrc );
Calculates the message digest for the null-terminated string pointed by pSrc.
The digest is retrieved in the memory buffer pointed by pDest. The size of the memory buffer pointed by pDest must be at least CMD5::DIGESTSIZE bytes.
Example
|
Note.
In the above example mydata is a null-terminated string. Therefore, the call
CMD5::Calculate( digest, (const unsigned char*)mydata, strlen( mydata ) );
can be replaced by
CMD5::Calculate( digest, mydata );
CMD5 Overview | Class Members | Useful Links | HashCalc
See Also CMD5::CalculateHex
| Send Feedback to SlavaSoft Inc. | Tell a friend about QuickHash Library |