The plain and cypher texts are the same size though you'll probably want to include the IV in the cypher text
On Apr 30, 5:33 am, atomic928 <[EMAIL PROTECTED]> wrote: > I have created an Encrypt and Decrypt function that bascially just > wraps Crypto++'s CFB_Mode<AES>::Encryption and Decryption. > > I pass in an outBuff to return either the Encrypted or Decrypted data > as the case may be but my delima is how do I know how big to make the > outBuffer before I even call into any Crypto++ calls? > > I know if I do something like: > char plaintext[] = "Now is the time for all good men to come to the > aid..."; > CFB_Mode<AES>::Encryption cfbEncryption(key, AES::DEFAULT_KEYLENGTH, > iv); > cfbEncryption.ProcessData((byte*)plaintext, (byte*)plaintext, > messageLen) > > I can get the result of plaintext.length() or plaintext.size() after > the Encryption call but I need some idea of what my outbuffer should > be to start with. > > Does the cfbEncryption.ProcessData() call reallocate the passed in > buffer if it needs to expand the size? > Should I not worry about the outbuffer size if the case above is true > and just make the outbuffer the same size as the inbuffer if > ProcessData or some other encryption call will manipulate the memory > size? > > Thanks All for you help --~--~---------~--~----~------------~-------~--~----~ 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. -~----------~----~----~----~------~----~------~--~---
