Jeffrey,
Thank you! I'm looking at the AESEncRegKey right now.
As for the Filter example - it looks like for it to work, it has to have a
Sink on the output end. For me it does not work when input is a file with
variable-length records (so the receiving application does not know the
length of each record in advance).
It appears that encryptor.MessageEnd() disappears somewhere, and the
resulting encrypted+encoded file has no notion of where the original
plaintext records were ending. At least that's what I'm observing...
Perhaps Wei Dai can answer why the reverse of
CBC_Mode<AES>::Encryption encrAES;
......................
Base64Encoder *baseEnc = new
Base64Encoder(new FileSink("tenc.txt"));
StreamTransformationFilter aesEnc(encrAES, baseEnc);
does not seem to work? I mean - in the above I can do
aesEnc.Put(plaintext, len);
aesEnc.MessageEnd();
and the encrypted+encoded record gets stored in the file (program runs and
the resulting file looks good).
I need the reverse now, that I could use like
len = aesDec.Get(decrypted, maxLen);
and then process len bytes of record stored in "decrypted" byte array...
???
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Jeffrey Walton
> Sent: Wednesday, September 26, 2007 12:28
> To: Mouse
> Cc: Crypto++ Users
> Subject: Re: Tying together Base64Decoder and AES Decryptor?
>
> Hi Mouse,
>
> > how do I connect them
> http://www.cryptopp.com/wiki/StreamTransformationFilter
>
> I believe an example of using the filter can be found at
> http://www.codeproject.com/system/AESEncRegKey.asp
>
> Jeff
>
> On 9/26/07, Mouse <[EMAIL PROTECTED]> wrote:
> >
> > Let me ask a simpler question. Here are the definitions:
> >
> > CBC_Mode<AES>::Decryption decrAES;
> > Base64Decoder b6d;
> >
> > My question is: how do I connect them into something like this:
> >
> > StreamTransformationFilter aesD(b6d, decrAES);
> >
> > The above line doesn't even compile (types are wrong) - can
> you please
> > suggest the correct types and constructs?
> >
> > Tnx!
> >
> > P.S. If then you could show how to connect the above aesD with
> > FileSource - I'd be more than happy. :-)
> >
> > P.P.S. A solution that does something like FileSource
> f("name", true,
> > new Base64Decoder(new StreamTransformationFilter(decrAES, new
> > FileSink("name2")))); is not acceptable for this
> application, sorry.
> > Because it adds FileSink.
> >
> > P.P.P.S. Does crypto++ library require symmetry on both ends, i.e.
> > FileSource on one end must be paired with FIleSink on the
> other?! At
> > least one example that works for me seems to prove that
> assumption wrong, but...
> > > >
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---