I am trying to do the following expression, but I keep running into this exception, "Cannot find property setter for 'chars'."
Here is the expression:
xstr, str : string;
for i := 1 to length(str) do
begin
if ((i mod 2)<>0) then
begin
xstr[i] := char(Ord(str[i]) xor $AA); <<<<------ Exception Raised
end
else
begin
xstr[i] := char(Ord(str[i]) xor $55); <<<<------ Exception Raised
end;
end;
The value of "str" is passed into the encryption method.
This is part of an encryption method. What is the best way to do this?