On Oct 18, 4:12 pm, "@_jdepaz" <[email protected]> wrote: > Saludos a todos, > > Usando Crypto++ 5.5.2, cuando se utiliza StreamTransformationFilter: > > try > { > StreamTransformationFilter filter(Encryptor, new StringSink > (l_strTextoCifrado)); > filter.Put(reinterpret_cast<const unsigned char*>(p_bufferEntrada), > p_nLargoEntrada); > /*en la siguiente línea ocurre una excepción*/ > filter.MessageEnd(); //In this case an exception Exception > 0xE06D7363 > > catch (CryptoPP::Exception e) > { > throw CExceptionCifrado(e.what());} > > catch (...) > { > throw CExceptionCifrado("Error Desconocido"); > > } byte key[AES::DEFAULT_KEYLENGTH];
memset(key, 0x00, sizeof(key)); byte iv[AES::BLOCKSIZE]; memset(iv, 0x00, sizeof(iv)); string plain = "AES encryption test"; string cipher; CBC_Mode< AES >::Encryption e; e.SetKeyWithIV(key, sizeof(key), iv); StreamTransformationFilter filter(e); filter.Put((const byte*)plain.data(), plain.size()); filter.MessageEnd(); const size_t ret = filter.MaxRetrievable(); cipher.resize(ret); filter.Get((byte*)cipher.data(), cipher.size()); Jeff -- 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.
