• 标 题:贴上Winzip的注册机(好像老了点),算是初到此处的见面礼吧 (497字)
  • 作 者:Cyu_
  • 时 间:2001-11-17 21:13:01
  • 链 接:http://bbs.pediy.com

procedure TForm1.Button1Click(Sender: TObject);
Var i,k,l:integer;
a,b,c:dword;
Begin
k:=0;a:=0;b:=0;c:=0;
for i:=0 to length(names.text)-1 do begin
    k:=k+ord(names.text[i+1])*i;
    c:=ord(names.text[i+1]) shl 8;
    for l:=1 to 8 do begin
        b:=a;
        b:=b xor c;
        if ((b and 65535) and $8000)=0 then a:=a shl 1
        else a:=(a*2) xor 4129;
        c:=c shl 1;
    end;
end;
k:=k and 65535;
a:=(a+99) and 65535;
sn.text:=inttohex(a,4)+inttohex(k,4);
End;