nbsp;
Reg.RootKey :=hkey_local_machine;
KeyName:=''Software\jsjb\Example'';
if Reg.OpenKey(KeyName,true) then
begin
Reg.WriteString(''Passwd'',InptCode);
Reg.WriteString(''UsrName'',InptName);
end;
reg.CloseKey ;
finally
Reg.Free ;
end;
NoRegistry:=false;
//可修改注册后的界面
end;
end;
end;
end;
三、密码的变换函数。此变换函数可由读者自由发挥,在此,仅示一例而已。
Function TForm1.Encrypt(TempStr:string):string;
Var
Str1:String;
i,j:Integer;
Begin
Str1:='''';
For i:=1 to Length(TempStr) do
begin
j:=(iiii mod (i+30))+(ii mod (i+20))+i3+1;
Str1:=Str1+chr(ord(TempStr[i])+j);
j:=(iiii mod (i+30))+(ii mod (i+20))+i3+1;
Str1:=Str1+chr(ord(TempStr[i])+j);
End;
Result:=Str1;
end;