MD5 在windows下使用,要是在MACOS下使用需要改变

MD5Init()中ZeroMemory(@Buffer, SizeOf(MD5Buffer)); 改为 FillChar(Buffer, SizeOf(MD5Buffer), 0);//delphi标准函数

MD5Update()中CopyMemory(@Context.Buffer[Index], Input, PartLen);改为move(Input[0], Context.Buffer[Index], PartLen);//delphi标准函数  ,CopyMemory(@Context.Buffer[Index], @Input[I], Length - I);改为move(Input[i], Context.Buffer[Index], Length - i);

如果是XE以下的版本升级到XE以上的,需要把string类型改为ansistring类型

 

来源参考路径 适用于DelphiXe2的MD5单元_白忙剩人_新浪博客 (sina.com.cn)

posted on 2021-12-09 10:59  liguang178  阅读(72)  评论(0)    收藏  举报