Thanks for all your explanation.

> Sorry, but *my* decryptor did not throw any exceptions - I've tested it
> before posting. I don't know the code that *you* wrapped around the
> decryptor, so cannot comment.

I thought that too. I then ran the test using your sample code, rash-
enc.cc without any changes. It works but after I added the more
characters in the plain text file (say up to 2KB). The test ended up
with the exception, the ciphertext is not a multiple of block size
again.

> Oh so you removed the MessageEnd() at the end of the encryption, so there's
> nothing to tell the encryptor "Now there's no more input - therefore pad
> whatever data is sitting in the buffer, encrypt it and push it out". And now
> you're surprised that your code does not work?

Not in the sample code from FAQ. I actually wondered why your code
didn't call MessageEnd() (after the FileSource(...)) until I read
about this in Crypto++ UserGuide:

"PumpAll(). Pumps all messages just like PumpMessages() would if
called with no argument, and then pumps the following uncomplete
message until there is no more data to extract. With FileSource and
StringSource, PumpAll() extracts data like Pump() and then calls
MessageEnd()."


--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---

Reply via email to