This class is a helper for encrypted stream input. More...
#include <DwmXChaCha20Poly1305InBuffer.hh>
Inherits streambuf.
Public Member Functions | |
| InBuffer (std::istream &is, const std::string &key) | |
Construct from the given encrypted istream is and the decryption key key. More... | |
Protected Member Functions | |
| int_type | underflow () override |
This class is a helper for encrypted stream input.
It is used as a streambuf for an istream. It will buffer internally until a a complete message is available, where a complete message is comprised of nonce (initialization vector), length, data and MAC.
This class is typically not used directly, but is instantiated by XChaCha20Poly1305::Istream.
| Dwm::XChaCha20Poly1305::InBuffer::InBuffer | ( | std::istream & | is, |
| const std::string & | key | ||
| ) |
Construct from the given encrypted istream is and the decryption key key.
key must be 32 bytes since we're using XChaCha20.