function TForm1.Cript (Stringa : String; cripting : boolean): String;
Var
i,k : integer;
begin
if Cripting then
begin
for i := 1 to Length(Stringa) do
begin
result := result + IntToHex((Ord(Stringa[i]) xor i),2);
end;
end
else
begin
for i := 1 to Length(Stringa) div 2 do
begin
result := result + Chr(StrToInt('$' + Copy((Stringa),k,2)) xor i);
k := k + 2;
end;
end;
end;
Semoga bermanfaat……