Wie würde man das machen, wenn man Buffer und Count als Parameter hat?
Delphi-Quellcode:
procedure CryptStream(var Buffer; Count: Lonmgint);
var
Buffer: array[0..511] of Byte;
Bytes,I,Position: Integer;
begin
RandSeed := Key;
Position := Stream.Position;
repeat
Bytes := Stream.Read(Buffer, SizeOf(Buffer));
for I := 0 to Bytes -1 do
Buffer[I] := Buffer[I] xor Random(256);
Stream.Position := Position;
Stream.Write(Buffer, Bytes);
Inc(Position, Bytes);
until Bytes = 0;
end;
Wie ist das mit Buffer zu handhaben?
Danke!