maybe has to do with this, from the Readme file (I just noticed it recently myself, which explains some problems I was having a while back)
"If a constructor for A takes a pointer to an object B (except primitive types such as int and char), then A owns B and will delete B at A's destruction. If a constructor for A takes a reference to an object B, then the caller retains ownership of B and should not destroy it until A no longer needs it." not sure that's your issue though, as I still have some code very similar to yours that seems to work okay... otherwise I'm on OSX, so I'm afraid I can't help much with MSVC issues. hth, cw On Jul 16, 4:24 am, amnon <[EMAIL PROTECTED]> wrote: > Hi > > I am doing a very simple AES instansiation, And it fails with > unhandled exception because of memory management problems. > The code that I wrote is: > byte key[AES::DEFAULT_KEYLENGTH]; > memset(key, 0x00, AES::DEFAULT_KEYLENGTH); > AES::Encryption aesEncryption(key, 16); > -> > There is an MSVC window with the message "unhandled exception at xxx: > Access violation reading location yyy" > The error happens because CryptoPP tries to free a pointer that was > not allocated !!! in the function > AllocatorWithCleanup.deallocate() !!! > > I am using version 5.5.1, with MSVC2005 SP1, Using CryptoPP as a > static library, and the runtime libraries are "multi-threaded debug" > > Can someone help me with this problem ??? > Thank you --~--~---------~--~----~------------~-------~--~----~ 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. -~----------~----~----~----~------~----~------~--~---
