界面库

优化
This commit is contained in:
JianjunLiu 2023-09-25 09:56:00 +08:00
parent b4fd007a0f
commit 209b5d93d6
2 changed files with 15 additions and 7 deletions

View File

@ -5,8 +5,18 @@ Begin
@param(s)(string) 字符串 %% @param(s)(string) 字符串 %%
@return(string) 8位长度的信息指纹%% @return(string) 8位长度的信息指纹%%
**} **}
{$ifdef linux} fc := static get_f();
G_CRC32TABLE:=array( return call(fc,s,0);
End;
function get_f(); //获得函数指针
begin
r := findfunction("getmsgdigest");
if r then return r;
return thisfunction(my_crc32);
end
function my_crc32(s,f);//自己实现的crc32
begin
G_CRC32TABLE:= static array(
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
@ -83,7 +93,5 @@ Begin
result .^= ebx; result .^= ebx;
end; end;
result:=_not(result); result:=_not(result);
return inttohex(result,8); return inttohex(result,8);
{$endif} end
return GetMsgDigest(s,0);
End;

View File

@ -4,7 +4,7 @@ unit UTslMemo;
**} **}
{$ifdef linux} {$ifdef linux}
{$define linuxpop} {$define linuxpop123}
{$endif} {$endif}
interface interface
uses utslvclauxiliary,utslvclmemstruct,utslvclgdi,utslvclstdctl; uses utslvclauxiliary,utslvclmemstruct,utslvclgdi,utslvclstdctl;