Delphi IdHashMessageDigest 获取文件MD5


本文整理自网络,侵删。

 
uses IdHashMessageDigest;

function MD5(const fileName : string) : string;
var
  idmd5 : TIdHashMessageDigest5;
  fs : TFileStream;
begin
  idmd5 := TIdHashMessageDigest5.Create;

  fs := TFileStream.Create(fileName, fmOpenRead OR fmShareDenyWrite) ;
  try
    result := idmd5.HashStreamAsHex(fs);
  finally
    fs.Free;
    idmd5.Free;
  end;
end;

相关阅读 >>

crc32.pas 第二版

Delphi word转pdf两种方法

vclzip控件的使用

Delphi 实现qq窗体的缩入伸出功能

Delphi xe 获取android 系统版本

Delphi从excel读取数据存入数据库demo

Delphi 隐藏进程代码

Delphi xe7 up1 调用android振动功能

Delphi firedac连接oracle

Delphi设置dbgrid每列自动居中

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...