在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
unit Unit2; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs , IdHashMessageDigest, StdCtrls; type TMD5 = class(TIdHashMessageDigest5); TForm2 = class(TForm) Memo1: TMemo; Button1: TButton; Memo2: TMemo; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation {$R *.dfm} procedure TForm2.Button1Click(Sender: TObject); var MyMD5: TMD5; begin MyMD5 := TMD5.Create; try Memo2.Text := MyMD5.HashStringAsHex(Memo1.Text); // Indy10中可以直接HashStringAsHex finally MyMD5.Free; end; end; end. 以上方法只适合 Indy10 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论