GetHashFromFile
Generates a hash over the contents of the specified file.
Syntax
HRESULT GetHashFromFile(
LPCSTR szFilePath,
unsigned int *piHashAlg,
BYTE *pbHash,
DWORD cchHash,
DWORD *pchHash
);
Parameters
- szFilePath [in]
The name of the file to hash. - piHashAlg [in/out]
The algorithm to use when generating the hash. Valid algorithms are those defined by the Win32 crypto APIs. If piHashAlg is set to 0, the default algorithm CALG_SHA1 is used. - pbHash [out]
A byte array containing the generated hash. - cchHash [in]
The maximum size of the buffer pointed to by pbHash. - pchHash [out]
The actual number of bytes returned in pbHash.