W
wyjpg
Unregistered / Unconfirmed
GUEST, unregistred user!
下面是DLL中的一个函数.
function DecryptPW(InStr: Pchar): Pchar;stdcall;
var
I: Integer;
j: Integer;
vInStr,vOutStr:String;
vKey:Integer;
begin
vKey:=PasswordKey;
vInStr:=InStr;
vOutStr:='';
for i:=1 to (length(vInStr) div 2) do
begin
j:=(Integer(vInStr[2*i-1])-65)*26;
j:=j+(Integer(vInStr[2*i])-65);
vOutStr:=vOutStr + Char(j);
end;
vInStr:=vOutStr;
for I := 1 to Length(vInStr) do
begin
vOutStr := char(byte(vInStr) xor (vKey shr 8));
vKey := (byte(vInStr) + vKey) * C1 + C2;
end;
showmessage('outstr='+voutstr);
Result:=Pchar(vOutStr);
end;
function DecryptPW(InStr: Pchar): Pchar;stdcall;
var
I: Integer;
j: Integer;
vInStr,vOutStr:String;
vKey:Integer;
begin
vKey:=PasswordKey;
vInStr:=InStr;
vOutStr:='';
for i:=1 to (length(vInStr) div 2) do
begin
j:=(Integer(vInStr[2*i-1])-65)*26;
j:=j+(Integer(vInStr[2*i])-65);
vOutStr:=vOutStr + Char(j);
end;
vInStr:=vOutStr;
for I := 1 to Length(vInStr) do
begin
vOutStr := char(byte(vInStr) xor (vKey shr 8));
vKey := (byte(vInStr) + vKey) * C1 + C2;
end;
showmessage('outstr='+voutstr);
Result:=Pchar(vOutStr);
end;