Location: Symbol Reference > Functions > JwCompareFileHash Function
JWSCL Documentation
JwCompareFileHash Function
function JwCompareFileHash(const FilePath: WideString; const OriginalHash: TJwFileHashData): Boolean;
const FilePath: WideString 
Defines a path to a file that is used to calculate a hash.  
const OriginalHash: TJwFileHashData 
Defines a hash that is compared to the hash of the file.  

Returns true if the hash of file and the given one is identical; otherwise false. If the parameter OriginalHash has a nil pointer the return value is also false. 

raise EJwsclFileMappingException see TJwFileStreamEx.Create for more information. EJwsclSecurityException There can be other exceptions raised by TJwHash.Create, TJwHash.HashData and TJwHash.RetrieveHash.

JwCompareFileHash creates a hash from a given file and compares it to an already calculated hash. 


  • This function uses TJwFileStreamEx for getting hash in the fastest way possible.
  • This function uses SHA hashing.

Copyright (c) 2010. All rights reserved.
This help was created by Doc-O-Matic sponsored by toolsfactory software inc.
What do you think about this topic? Send feedback!