I have found a SecByteBlockSink class, made by Jeffrey Walton; now I try to
use it correctly. That's how my code looks for now:
------------------------------------------------------------------------------------
try
{
//New AES Encryption object
GCM<AES>::Encryption HeaderEncryption;
//Setting user key and random IV
HeaderEncryption.SetKeyWithIV(key, sizeof(key), iv,
sizeof(iv));
//Creating SecByteBlock for the header
SecByteBlock blockky(0x00, 0);
//Filter with a SecByteBlockSink
AuthenticatedEncryptionFilter ef(HeaderEncryption,
new SecByteBlockSink, false, TAG_SIZE);
//Encrypting MakeHeader
ef.ChannelPut("", (const byte*)&MakeHeader,
sizeof(MakeHeader));
ef.ChannelMessageEnd("");
//Writing SecByteBlock
Out.write(reinterpret_cast<const char*>(blockky.BytePtr()),
blockky.size());
}
------------------------------------------------------------------------------------
--
--
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.
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.