|
QuickHash Library |
Type Library |
|
QHASH_FileDigest
int QHASH_FileDigest( [ in ]int nAlgID, [ out ]QHASH_Digest
*pDigest, [ in , string ] unsigned char* pszFileName
);
Return value
Zero if calculation is successful, otherwise nonzero.
Note. All possible return values are
specified in the Error Codes List.
Parameters
nAlgID
[in] The ID of the hash/checksum
algorithm selected for calculations. For example, nAlgID has to be set
to SHA1_ALGID when you need to calculate the digest using
SHA-1 hash algorithm.
Note. All supported hash/checksum
algorithms with their corresponding IDs are specified in the
Predefined Constants List.
pDigest
[out] The memory buffer that will receive the message digest/checksum.
Note. All predefined types are specified in the
Predefined Types List.
pszFileName
[in] A null-terminated
string specifying the name of the file for which to calculate the message digest/checksum.
Remarks
Calculates the message digest/checksum for a file. The digest/checksum is retrieved in the
pDigest memory buffer.
VB Example
Private Sub MyButton_Click()
Dim Digest As QHASH_Digest
'Calculate the digest
QHASH_FileDigest MD5_ALGID, Digest, "C:\Test\Test.txt"
'Show the hexadecimal representation of the digest
MsgBox QHASH_ConvertToHex(Digest.Value(0), MD5_DIGESTSIZE, True)
End Sub
|
|
Type Library Overview
| Type Library Functions
|
Useful Links | HashCalc
See Also
QHASH_FileHexDigest,
QHASH_BlockDigest,
QHASH_StringDigest,
QHASH_ConvertToHex
|