function encode(x)
for i=1 to len(x)
TempNum=hex(asc(mid(x,i,1)))
if len(TempNum)=4 then
encode=encode & cstr(TempNum)
else
encode=encode & "00" & cstr(TempNum)
end if
next
end function function decode(x)
for i=1 to len(x) step 4
decode=decode & chr(int("&H" & mid(x,i,4)))
next
end function
for i=1 to len(x)
TempNum=hex(asc(mid(x,i,1)))
if len(TempNum)=4 then
encode=encode & cstr(TempNum)
else
encode=encode & "00" & cstr(TempNum)
end if
next
end function function decode(x)
for i=1 to len(x) step 4
decode=decode & chr(int("&H" & mid(x,i,4)))
next
end function
var
i:integer;
TempNum:String;
begin
for i:=1 to Length(x) do
begin
TempNum:=IntToHex(Ord(x[i]),2);
if Length(TempNum)=4 then
Result:=Result + TempNum
else
Result:=Result + '00' + TempNum;
end;
end;function _decode(x:String):String;
var
i:integer;
begin
i:=1;
while (i<Length(x)) do
begin
Result:=Result + chr(StrToint('$'+ copy(x,i+2,2)));
i:=i+4;
end;
end;
//你要的是这个么?