This class is a helper for encrypted stream input. More...
#include <DwmCredenceXChaCha20Poly1305InBuffer.hh>
Inherits std::streambuf.
Public Member Functions | |
| InBuffer (std::istream &is, const std::string &key) | |
Construct from the given encrypted istream is and the decryption key key. | |
Protected Member Functions | |
| int_type | underflow () override |
| Implements std::streambuf::underflow() | |
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::Credence::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.