43 #ifndef _DWMAESGCMOUTBUFFER_HH_ 44 #define _DWMAESGCMOUTBUFFER_HH_ 49 #include <cryptopp/aes.h> 50 #include <cryptopp/cryptlib.h> 51 #include <cryptopp/gcm.h> 52 #include <cryptopp/osrng.h> 72 :
public std::streambuf
79 OutBuffer(std::ostream & os,
const std::string & key);
82 int_type overflow(int_type c)
override;
84 std::streamsize xsputn(
const char *p, std::streamsize n)
override;
88 CryptoPP::byte _key[16];
89 CryptoPP::byte _iv[16];
90 CryptoPP::AutoSeededRandomPool _rng;
91 CryptoPP::GCM<CryptoPP::AES>::Encryption _encryptor;
92 std::unique_ptr<CryptoPP::AuthenticatedEncryptionFilter> _aef;
100 #endif // _DWMAESGCMOUTBUFFER_HH_ OutBuffer(std::ostream &os, const std::string &key)
Construct with the given ostream os and encryption key key.
This class is a helper for encrypted stream output.
Definition: DwmAESGCMOutBuffer.hh:71