delphi - How to use EncdDecd.EncodeStream -


I want to encrypt a stream but some do not work. Output stream is empty after encoding:

  Process TForm5.Button1Click (Sender: Tubbed); VAR s: string; Instream, Outstream: TMemoryStream; Start InpStream: = TMemoryStream.Create; Outstream: = TMemoryStream.Create; S: = 'zzzzzzzzzzzzzzzz' + CRLF + 'zzzzzzzz'; InpStream.WriteBuffer (S [1], Length (s)); & Lt; ---- After this, the size of the Instream 34 encoded disk. Encodestream (instream, outstream); If Outstream Size & lt; = 0 then empty dummy; & Lt; ------- Outstream.Size is Zero! FreeAndNil (InpStream); FreeAndNil (Outstream); End;  


Comments