I have the following code in delphi to decrypt:
new_size := Length(Source) - 1;
for c := 24 to new_size - 1 do
begin
v := Source[c];
v := v - key;
v := v AND $FF;
x := v XOR (Source[c + 1]);
Source[c] := x;
end;
where
Source: Array of Byte;
Key: Byte;
Any one a quick idea how to reverse this (encrypt again) ?
This code is the inverse of the code in the question:
And the code in the question can be written much more simply like this: