Hi all,
I have a stange error while trying to run a very simple code : there
is the code :
---------
int main() {
byte key[ CryptoPP::AES::DEFAULT_KEYLENGTH ],
iv[ CryptoPP::AES::BLOCKSIZE ];
::memset( key, 0x01, CryptoPP::AES::DEFAULT_KEYLENGTH );
::memset( iv, 0x01, CryptoPP::AES::BLOCKSIZE );
// Message M
std::string PlainText = "Hello AES World";
// Debug
std::cout << "Plain Text:" << std::endl;
std::cout << " '" << PlainText << "'" << std::endl;
std::cout << std::endl;
// Cipher Text Sink
std::string CipherText;
// Encryption
CryptoPP::CBC_Mode<CryptoPP::AES>::Encryption Encryptor( key,
CryptoPP::AES::DEFAULT_KEYLENGTH, iv ); // problematic !
// ...
}
---------
This results in :
-----------------------
'testcryptocpp.exe' : Chargé
'****************************************************
\testcryptocpp.exe', Les symboles ont été chargés.
'testcryptocpp.exe' : Chargé 'C:\WINDOWS\system32\ntdll.dll', Aucun
symbole n'a été chargé.
'testcryptocpp.exe' : Chargé 'C:\WINDOWS\system32\kernel32.dll', Aucun
symbole n'a été chargé.
'testcryptocpp.exe' : Chargé 'C:\bin\cryptopp.dll', Les symboles ont
été chargés.
'testcryptocpp.exe' : Chargé 'C:\WINDOWS\system32\advapi32.dll', Aucun
symbole n'a été chargé.
'testcryptocpp.exe' : Chargé 'C:\WINDOWS\system32\rpcrt4.dll', Aucun
symbole n'a été chargé.
'testcryptocpp.exe' : Chargé 'C:\WINDOWS\WinSxS
\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-
ww_6b128700\msvcp80.dll', Aucun symbole n'a été chargé.
'testcryptocpp.exe' : Chargé 'C:\WINDOWS\WinSxS
\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-
ww_6b128700\msvcr80.dll', Aucun symbole n'a été chargé.
'testcryptocpp.exe' : Chargé 'C:\WINDOWS\system32\msvcrt.dll', Aucun
symbole n'a été chargé.
Exception de première chance à 0x7c9205f8 dans testcryptocpp.exe :
0xC0000005: Violation d'accès lors de la lecture de l'emplacement
0x00000010.
Exception de première chance à 0x7c974ed1 dans testcryptocpp.exe :
0xC0000005: Access violation.
Exception non gérée à 0x7c974ed1 dans testcryptocpp.exe : 0xC0000005:
Access violation.
Le programme '[3312] testcryptocpp.exe: Natif' s'est arrêté avec le
code 0 (0x0).
----------------------- (I'm sorry, messages are in French, but I
think (hope !) they are trivial to understand)
As you can see, there's an access violation thrown at startup (before
the main function, while loading dlls and exe). If I suppress the last
line (creation of encryptor), this error does not occur. Any
suggestion to help me ?
Configuration : Visual Studio 2005, Cryptopp 5.5.1, compiled as dll.
Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---