Hi James,
James> I've setup the header and trailer as strings, so I can pipeline a
James> StringSource to a FileSink; but successive calls like:
James> StringSource(headerStr... FileSink(my output file));
James> StringSource(dataBuffer, new Base64Encoder(FileSink(my output file));
James> StringSource(trailerStr... FileSink(my output file));
James> just overwrite the data written to the output file.
I generally append it all to a string using a string sink that I
define like this:
typedef CryptoPP::StringSinkTemplate<STLString> STLStringSink;
and then output the resulting string to the file.
However, you can almost certainly do this:
ofstream f_out("filename");
StringSource(headerStr,...,new FileSink(f_out));
StringSource(dataBuffer,...,new FileSink(f_out));
StringSource(trailerStr,...,new FileSink(f_out));
HTH.
--
Russell Robinson (mailto:[EMAIL PROTECTED])
Author of Tectite (CRM and Licensing for Software Developers)
Download your free CRM from: http://www.tectite.com/