Encrypt big char* using std::string with Crypto++
问题 I am new with Crypto++. I want to using Crypto++ library to encrypt/decrypt a large byte array in C++. The data can be anything, so asume its binary format. First, I tried with "byte array" (char * or char[]). byte PlainText[] = { 'H','e','l','l','o',' ', 'W','o','r','l','d', 0x0,0x0,0x0,0x0,0x0 }; byte key[ AES::DEFAULT_KEYLENGTH ]; ::memset( key, 0x01, AES::DEFAULT_KEYLENGTH ); // Encrypt ECB_Mode< AES >::Encryption Encryptor( key, sizeof(key) ); byte cbCipherText[AES::BLOCKSIZE]; Encryptor