单元 IdHashSHA申明
function GetFile_SHA1(const iFileName: String): String; //Checksum hash value for firefox
var
SHA1 : TIdHashSHA1;
fileStream:
TMemoryStream;
begin
SHA1 := TIdHashSHA1.Create;
fileStream := TMemoryStream.Create;
try
fileStream.LoadFromFile(iFileName);
Result :=
SHA1.HashStreamAsHex(fileStream);
finally
fileStream.Free;
SHA1.Free;
end;
end;
原文地址:http://www.cnblogs.com/onionhacker/p/3712968.html