There is no such thing as ArraySource, only ArraySink. However StringSource has a second constructor which takes a byte * and a length. Use that if your string may have a '\0' in the middle. BTW, I just answered this same question a few days ago. Please check the archives before asking questions in the future.
On Tue, Feb 25, 2003 at 11:15:59PM -0800, Michael Hunley wrote: > If you know the size ahead of time (even a conservatively large estimate > of), then you can use ArraySource. I'm pretty green on using those > aspects, so I imagine someone else in the community may have a better > suggestion. > > michael > > At 05:18 PM 2/25/2003 +0100, you wrote: > >Replacing "FileSource" with "StringSource" works well > >in all cases where the File stores exactly one string > >(this is true for all? sort of keys and signatures > >(that i use)). > > > >is there a simple way to replace FileSource to handle > >char arrays (including 0x00 chars)? > > > >example: > >VerifierFilter *verifierFilter = new > >VerifierFilter(pub); > >verifierFilter->Put(signature, pub.SignatureLength()); > >//FileSource f(messageFilename, true, verifierFilter); > >StringSource f(messageString, true, verifierFilter); > > > >using StringSource works with real strings, but the > >messageString is MAC-encrypted (means having 0x00 > >chars in it). > > > >thanks a lot for any advice > > > >__________________________________________________________________ > > > >Gesendet von Yahoo! Mail - http://mail.yahoo.de > >Bis zu 100 MB Speicher bei http://premiummail.yahoo.de
