Hey I want start to using CryptoPP so I downloaded it from their site.
I added to project lib which they provide and tried to run simple program:
Code:
// Key and IV setup
byte key[ CryptoPP::AES::DEFAULT_KEYLENGTH ], iv[ CryptoPP::AES::BLOCKSIZE ];
memset( key, 0x00, CryptoPP::AES::DEFAULT_KEYLENGTH );
memset( iv, 0x00, CryptoPP::AES::BLOCKSIZE );
// String and Sink setup
std::string plaintext = "Now is the time for all good men to come to the aid...";
std::string ciphertext;
// Create Cipher Text
CryptoPP::AES::Encryption aesEncryption(key, CryptoPP::AES::DEFAULT_KEYLENGTH);
CryptoPP::CBC_Mode_ExternalCipher::Encryption cbcEncryption( aesEncryption, iv );
CryptoPP::StreamTransformationFilter stfEncryptor(cbcEncryption, new CryptoPP::StringSink( ciphertext ) );
stfEncryptor.Put( reinterpret_cast<const unsigned char*> ( plaintext.data() ), plaintext.length() + 1 );
stfEncryptor.MessageEnd();
But It says :
undefined reference to `CryptoPP::CipherModeFinalTemplate_ExternalCipher< CryptoPP::CBC_Encryption>::CipherModeFinalTemplate _ExternalCipher(CryptoPP::SimpleKeyedTransformatio n<CryptoPP::BlockTransformation>&, unsigned char const*, int)'|
And much more undefined references to CryptoPP, what could I did wrong?