将MD5串原文写入文件中,用UE打开显示的前16字节就是MD5原文
代码
Str := GetFileMD5(mmo1.Lines[i]);
n := 0;
for j := 1 to 16 do begin
n := j * 2 - 1;
Str1 := Str[n] + Str[n+1];
fMD5[j-1] := StrToInt('$' + Str1);
end;
FileInfoStream.Write(fMD5, 16);
n := 0;
for j := 1 to 16 do begin
n := j * 2 - 1;
Str1 := Str[n] + Str[n+1];
fMD5[j-1] := StrToInt('$' + Str1);
end;
FileInfoStream.Write(fMD5, 16);