Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
Delphi 10.2 Tokyo Professional
|
AW: Prüfsummen erstellen (DEC)
10. Mai 2011, 16:02
Hallo,
Wie wärs damit?
Delphi-Quellcode:
var S : String;
begin
case Combobox1.ItemIndex of
0 : S := THash_MD5.CalcFile('Dateiname', TFormat_HEX);
1 : S := THash_SHA1.CalcFile('Dateiname', TFormat_HEX);
end;
ShowMessage(S);
end;
Alternativ:
Delphi-Quellcode:
var S : String;
Hash: THash;
begin
case Combobox1.ItemIndex of
0 : Hash := THash_MD5.Create;
1 : Hash := THash_SHA1.Create;
end;
S := Hash.CalcFile('Dateiname', TFormat_HEX);
ShowMessage(S);
end;
Michael "Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
Geändert von Neutral General (10. Mai 2011 um 16:05 Uhr)
|