IGR_Calculate_MD5¶
IGR_Calculate_MD5 will calculate the MD5 hash of an input stream for unique document identification.
Prototype¶
IGR_LONG IGR_Calculate_MD5(
IGR_Stream *Stream,
IGR_UCS2* Name,
Error_Control_Block* ISYSError);
Parameters¶
Stream: IGR_Stream **
An open IGR_Stream.
Name: Unicode string (UCS2)
A buffer to receive the null-terminated MD5 hash (as a Unicode string). Must be allocated by the caller and be able to hold at least 33 UCS2 characters.
ISYSError: Pointer to Error_Control_Block
Returns error details if the call fails.
Return value¶
Success: IGR_LONG
Returns IGR_OK.
Failure: IGR_LONG
Returns one of the possible IGR_E error codes.
Sample code¶
IGR_UCS2 strHexOut[ISYS_SZ_MD5_HEX_LEN];
Error_Control_Block ISYSError;
IGR_LONG RC = IGR_Calculate_MD5(pStream, strHexOut, &ISYSError);
if (RC == IGR_OK)
// strHexOut will now contain a MD5 hash for the stream expressed as
// hexadecimal characters