Hello Everyone, I'm moving myself from my own C AES C Library to Crypto++.
In Crypto++ Wiki we have an example of AES ECB Encryption: AutoSeededRandomPool prng; SecByteBlock key(AES::DEFAULT_KEYLENGTH); prng.GenerateBlock( key, key.size() ); string plain = "ECB Mode Test"; string cipher, encoded, recovered; /*********************************\ \*********************************/ try { cout << "plain text: " << plain << endl; ECB_Mode< AES >::Encryption e; e.SetKey( key, key.size() ); // The StreamTransformationFilter adds padding // as required. ECB and CBC Mode must be padded // to the block size of the cipher. StringSource ss1( plain, true, new StreamTransformationFilter( e, new StringSink( cipher ) ) // StreamTransformationFilter ); // StringSource } catch( CryptoPP::Exception& e ) { cerr << e.what() << endl; exit(1); } /*********************************\ \*********************************/ // Pretty print cipher text StringSource ss2( cipher, true, new HexEncoder( new StringSink( encoded ) ) // HexEncoder ); // StringSource cout << "cipher text: " << encoded << endl; /*********************************\ \*********************************/ Can Somebody explain me where exactly in this piece of code encryption have place? In C library I have function which I have to call to encrypt data, it look similar to encrypt(plain_text, cipher_text, key); I know that encryption is made in try{} block, but I see only class declaration, key setting and after that is StringSource which Is transform bytes into string. Thank in advance for any help, Daniel -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.