I'm having hard time understanding the loop below , I understand it is used to encrypt strings , But i was wondering about the inc(k) instructions , If the buffer size is over 3 chars it will crash or does inc(k) stop when reaches k[2]?
How would this look like in c++? .
1 2 3 4 5 6
k:=$de;
for i:=0 to f.size-1 do
begin
m[i]:=m[i] xor k;
inc(k);
end
Thanks for your response , However my main question wasn't answered ,
If the buffer(m[i]) size is over 3 chars will it crash or does inc(k) stop when reaches k[2]?, I'm asking because the instructions seems to be working , However it doesn't make much sense to me , Because k size is 3 chars and the loop go for over 300 chars .
Oh right i'm sorry , , I figured it out after doing some research , looks like in Pascal if you write $63 it is a hex value , so $DE is 222 in decimal and it increases with each loop so just like you said k:=k+1 , the dollar sign confused me because i thought k was array of chars , I should have paid more attention , Thanks for your help!.