libkeepass 0.2.0
KeePass key database importer/exporter library
Loading...
Searching...
No Matches
keepass::hashed_istreambuf Class Referencefinal

Input streambuf that reads SHA-256-hashed, block-structured data. More...

#include <stream.hh>

Inheritance diagram for keepass::hashed_istreambuf:
keepass::hashed_basic_streambuf

Public Member Functions

 hashed_istreambuf (std::istream &src)
 Constructs an input streambuf that reads from the given stream.
 
bool BudgetExceeded () const
 Returns true if a resource budget was exceeded while reading.
 
 hashed_istreambuf (std::istream &src, const detail::ResourceLimits &limits)
 Constructs an input streambuf with explicit resource limits.
 
int underflow () override
 Reads and verifies the next block when the get area is exhausted.
 

Detailed Description

Input streambuf that reads SHA-256-hashed, block-structured data.

Each block consists of a BlockHeader followed by the raw data. The hash in the header is verified against the data on read. An empty block with a zero hash signals end-of-stream.

Constructor & Destructor Documentation

◆ hashed_istreambuf() [1/2]

keepass::hashed_istreambuf::hashed_istreambuf ( std::istream &  src)
inlineexplicit

Constructs an input streambuf that reads from the given stream.

Parameters
srcThe input stream to read hashed blocks from.

◆ hashed_istreambuf() [2/2]

keepass::hashed_istreambuf::hashed_istreambuf ( std::istream &  src,
const detail::ResourceLimits &  limits 
)
inline

Constructs an input streambuf with explicit resource limits.

Parameters
srcThe input stream to read hashed blocks from.
limitsThe resource budgets enforced while reading.

The documentation for this class was generated from the following file: