|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Crypto++ Integration Problem - Compiler Error Visual Studio 2003.NETI tried posting this earlier, but firefox crashed on me. Hopefully, this isn't a duplicate... I'm new to crypto++ and am trying to get a couple of examples I found working before I integrate with my code. I'm getting an error when I include the modes.h file and can't seem to find a solution through google searches and such. The crypto++ library compiled without a problem. I'm using Visual Studio 2003.Net on Windows XP. The errors and code snippets are below. Any help provided will be much appreciated. Thanks, Jeff ------ Build started: Project: CryptoTest, Configuration: Debug Win32 ------ Compiling... CryptoTest.cpp d:\SOURCESAFE\Spiral 17.1.5\cryptopp\algparam.h(322) : error C2061: syntax error : identifier 'buffer' d:\SOURCESAFE\Spiral 17.1.5\cryptopp\algparam.h(321) : while compiling class-template member function 'void CryptoPP::AlgorithmParametersTemplate<T>::MoveInto(void *) const' with [ T=bool ] d:\SOURCESAFE\Spiral 17.1.5\cryptopp\algparam.h(329) : see reference to class template instantiation 'CryptoPP::AlgorithmParametersTemplate<T>' being compiled with [ T=bool ] the code... <snip non-crypto header files> #include <cryptopp/aes.h> #include <cryptopp/modes.h> #include <cryptopp/osrng.h> <snip non-crypto code> AutoSeededRandomPool rnd; // Generate a random key byte key[AES::DEFAULT_KEYLENGTH]; rnd.GenerateBlock(key, AES::DEFAULT_KEYLENGTH); // Generate a random IV byte iv[AES::BLOCKSIZE]; rnd.GenerateBlock(iv, AES::BLOCKSIZE); char plainText[] = "Hello! How are you."; int messageLen = (int)strlen(plainText) + 1; ////////////////////////////////////////////////////////////////////////// // Encrypt CFB_Mode<AES>::Encryption cfbEncryption(key, sizeof(key), iv); cfbEncryption.ProcessData((byte*)plainText, (byte*)plainText, messageLen); ////////////////////////////////////////////////////////////////////////// // Decrypt CFB_Mode<AES>::Decryption cfbDecryption(key, sizeof(key), iv); cfbDecryption.ProcessData((byte*)plainText, (byte*)plainText, messageLen); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to cryptopp-users-unsubscribe@.... More information about Crypto++ and this group is available at http://www.cryptopp.com. -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Crypto++ Integration Problem - Compiler Error Visual Studio 2003.NET> I'm new to crypto++ and am trying to get a couple of examples I found > working before I integrate with my code. I'm getting an error when I > include the modes.h file and can't seem to find a solution through > google searches and such. The crypto++ library compiled without a > problem. > > I'm using Visual Studio 2003.Net on Windows XP. The errors and code > snippets are below. Any help provided will be much appreciated. This code compiles fine for me (VS2003 .Net SP1, XP SP3). I just included the headers and pasted the code into a cpp file in the project that uses cryptopp. (no other cryptopp headers were included there) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to cryptopp-users-unsubscribe@.... More information about Crypto++ and this group is available at http://www.cryptopp.com. -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |