From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,db1e3158636a30f2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-19 13:04:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!feed.news.nacamar.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: "Vincent Smeets" Newsgroups: comp.lang.ada Subject: Re: Fill string with multiple lines from standard_input Date: Mon, 19 Aug 2002 21:39:07 +0200 Organization: T-Online Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: news.t-online.com 1029787359 03 21897 ClZmbJ-VS3F4D7 020819 20:02:39 X-Complaints-To: abuse@t-online.com X-Sender: 05931805-0008@t-dialin.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:28221 Date: 2002-08-19T21:39:07+02:00 List-Id: "Stephen Leake" wrote in message news:ulm77svbe.fsf@gsfc.nasa.gov... > "Vincent Smeets" writes: > > > Hallo, > > > > No. this is not homework! > > Ok. But you didn't answer the other part: > > Why do you want to do this? I am working on a remote site and I want all my e-mail to be encrypted and forwarded. I am writing a program that will create a new mail with an attachment that contains the encrypted mail (with PGP). Just encrypting the complete mail isn't correct because the RFC822 and MIME headers should be in clear text (also inside attachments). I read the mail in one buffer and then scan for every attachment boundary (recursivly). The headers will be output as they are and every body part will first be decoded (base64, quoted-printable) and then encrypted with PGP. I will need the if they are in the lines because a message part can be signed by PGP. Removing the s will break the signature. I know that using the buffers will cost a lot of memory but that is not the problem at this moment. My consern is that reading all the bytes from the input stream will NOT give you the exact image of what the input stream actualy was! As a second release, I want to rewrite my program to work line by line. This way, I will need to preserve more state in between the processing of the lines, but this will too need the s as they are in the input stream! Thanks, Vincent