Hi Michael, Things can differ between VC++ release and debug builds, however if they do it is usually because of a fault in the code, not in VC++.
Debug builds initialize all variables and memory allocated by new etc. to specific values (0xCDCDCD etc.) to help us developers locate problems. I use Crypto++ in Debug and Release builds with VC6 + SP4 and haven't seen any problems. However I haven't used AESPHM. I also have a large complex app (ED4W www.getsoft.com, see sig) and haven't seen any differences here either. A good article to read is "Surviving the Release Version" at http://www.codeproject.com/debug/survivereleasever.asp Hope that helps. Thursday, December 12, 2002, 5:01:31 AM, you wrote: MD> Interesting because after I asked this question I wrote the attached program MD> using the AESPHM class from the Crypto++ User Guide. MD> I am using Crypto++ 4.2 with MSVC 6 Enterprise + SP5 + Processor Pack. I MD> have tried the below on 3 computers all with the same result. MD> My program when called with 'e' will encrypt a static string("Hio") using a MD> static key("111111111111111") and output the key and ciphertext into key.txt MD> and enc.txt respectively. MD> When called with 'd' the program will read in the key from key.txt and the MD> ciphertext from enc.txt and decrypt the ciphertext and output it to out.txt. MD> Next, I compiled the debug version and linked with the Debug build of MD> cryptopp. I ran the program through both encrypting and decrypting and in MD> out.txt I get "48696F" which is "Hio" which is the original plaintext. MD> Next, I compiled the release version and linked with the release build of MD> cryptopp. I ran the program through both encrypting and decrypting and in MD> out.txt I get "48696F" which is "Hio" which is the original plaintext. MD> Lastly, I took the release version and ran the encryption routine to MD> generate enc.txt and key.txt. Then I ran the debug version with 'd' to MD> decrypt the data. It produced NO exceptions yet produced a complete MD> different plaintext of 51DD0618A065A7AA6446F397 which is not only a MD> different plaintext but a completely different plaintext size. MD> I tried stepping through the debug app to see anywhere things get messed up MD> but I cannot find anything. MD> I do have NDEBUG defined in my Release builds. MD> This may be a problem with the AES PHM class so I have contacted Denis Bider MD> about this as well. MD> Any clues? MD> Michael Davis MD> Chief Technical Officer MD> DataNerds MD> http://www.datanerds.com MD> ----- Original Message ----- MD> From: "Wei Dai" <[EMAIL PROTECTED]> MD> To: <[EMAIL PROTECTED]> MD> Sent: Wednesday, December 11, 2002 11:16 AM MD> Subject: Re: Crash in Release Build >> On Tue, Dec 10, 2002 at 11:13:00PM -0600, Michael Davis wrote: >> > By having to define NDEBUG in our individual applications does that mean >> > that encrypting with the debug version of cryptopp may not be compatible >> > with decrypting using the release version of cryptopp? >> >> The debug and release versions of Crypto++ are compatible (assuming no MD> compiler >> optimization bugs). -- Best regards, Neville Franks, Author of ED for Windows - the programmers editor, an indispensable tool for great software development. http://www.getsoft.com Version 4.02 now available. New: Projects, Source Database, Difference Analysis.... Signup for our new Affiliate program and share in our success. Soft As It Gets Pty Ltd, 12 Fairview Grove, Glen Iris, VIC, 3146 Australia Ph +61 3 9885 4445, Fax +61 3 9885 4444, mailto:[EMAIL PROTECTED]
