//运行一遍是加密,再运行一遍是解密
Function TForm1.CryptStr(Const S:string):String;
var
i: integer;
fkey: integer;
begin
result:='';
fkey := 8; //加密常量8,可以自己改
for i:=1 to length(s) do
result := result+chr( ord(s) xor fkey);
end;
//使用时这样即可
var
AppINI:TIniFile;
ConnStr:String;
begin
AppINI:=TIniFile.Create(ExtractFilePath(Application.ExeName)+'AppSys/login.dll');
ConnStr:= AppINI.ReadString('ADOconn', 'Conn', '');
ConnStr:= CryptStr(ConnStr);
AppINI.Free;
.......