Delphi7 MD5 加密

引用三个单元,分别是:IdHashMessageDigest,IdGlobal, IdHash;

 1 uses IdHashMessageDigest,IdGlobal, IdHash;
2
3 vars:string;
4 MyMD5: TIdHashMessageDigest5;
5 Digest: T4x4LongWordRecord;
6 begin
7 s:='123456';
8 MyMD5 := TIdHashMessageDigest5.Create;
9 Digest := MyMD5.HashValue(s);
10 s:=MyMD5.AsHex(Digest);
11 end;

 

posted @ 2012-02-04 08:45  imlion  阅读(846)  评论(0编辑  收藏  举报