IHashMD5

 

     IHashMD5 represens a MD5 Hashing function object.

    

 

Reference

 

     See IUserHash about the technique to hash a long disk file.

 

When to Implement

 

     This interface is implemented by UserCrypto.dll

    

Methods in Vtable Order

 

IUnknown methods

 

QueryInterface      Returns pointers to supported interfaces.

AddRef      Increments the reference count.

Release      Decrements the reference count.     

 

    

IHashMD5 Methods:

 

Clear Reset the instance

DoHashing Apply the hashing function to an array of data

GetResult Get the result of the last DoHashing method

 

Method Description:

 

1:STDMETHODIMP Clear()

 

     Reset the instance

 

Return:

 

     S_OK if successful

     S_FALSE if not successful     

 

 

2:STDMETHODIMP DoHashing(unsigned char * pData, int len)

 

     Apply the hashing function to an array of data.

     You cannot seqment a long sequence of data into smaller pieces and hash each small piece one by one with this method. See the note for the technique to hash a file.

 

Return:

 

     S_OK if successful

     S_FALSE if not successful     

 

Parameters:

 

     pData: an array of data to be hashed with SHA-1.

 

     len: number of bytes in pData

 

3:STDMETHODIMP GetResult(DWORD dwResult[4])

 

     Get the result of the last DoHashing method

 

Return:

 

     S_OK if successful

     S_FALSE if not successful     

 

Parameters:

 

     dwResult a 4 element DWORD array to hold the hashing result