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;