Wei Dai <weidai <at> weidai.com> writes: > > You only have to break data into multiple-of-block-size chunks if you use > ECB or CBC mode (call MandatoryBlockSize() to see if chunking is needed, > and what the block size is). But Crypto++ will do it for you automatically > if you use the StreamTransformationFilter (buffering incomplete blocks as > needed). >
I found this example in the FAQ, section "How do I use a block cipher in Crypto++ 5.0?", but was confused as to how I'd get the data back out again. It would be helpful for the FAQ to include the reverse transformation for us newbies. My confusion was mainly based on the fact that I thought MessageEnd was a marker placed in the file. And so that when I used Pump to extract data I could Pump out complete messages. After playing with it for a while I realised that this was not the case. I think it just signals the filters that no more encoding will happen, though I'm not sure now what it means to have multiple messages being processed. More playing, with my new understanding this week will hopefully allow me to work out how to reverse this transformation. More likely it will reveal new things I'm misunderstanding :-) Well it it was to easy the boss could do it and I'd be out of a job. Thanks for your time. john
