- Код: Выделить всё
- procedure CryptBuf(pBuf: Pointer; BufLen: Integer;CodeKey: string);
 var
 I: Integer;
 P: pByte;
 begin
 P := pBuf;
 if( CodeKey <> '' )then
 for I := 0 to BufLen - 1 do
 begin
 P^ := Byte(CodeKey[1 + ((I - 1) mod Length(CodeKey))]) xor P^;
 inc(P);
 end;
 end;
нельзя ли сделать как нибуть так ?
- Код: Выделить всё
- var fs : TFileStream;
 begin
 if sd.Execute then
 begin
 fs := TFileStream.Create(sd.FileName,fmCreate);
 CreateCS(fs);
 fs.Position:=0;
 CryptBuf(fs,fs.Size,'123456');// =)
 fs.Free;
 end;
или надо перегнать в другой поток и шифровать частями ?





