|
libkeepass 0.2.0
KeePass key database importer/exporter library
|
Parses and serializes the KDBX XML body. More...
#include <kdbx_xml.hh>
Public Types | |
| using | BinaryPool = std::unordered_map< std::string, std::shared_ptr< Binary > > |
| using | IconPool = std::unordered_map< std::string, std::weak_ptr< Icon > > |
| using | GroupPool = std::unordered_map< std::string, std::shared_ptr< Group > > |
Public Member Functions | |
| void | set_kdbx4 (bool kdbx4) |
| True while reading or writing a KDBX 4 database. | |
| bool | kdbx4 () const |
| void | set_kdbx41 (bool kdbx41) |
| True while writing KDBX 4.1 (0x00040001). | |
| bool | kdbx41 () const |
| void | set_resource_limits (const detail::ResourceLimits &limits) |
| Sets the resource budgets enforced while parsing the XML body. | |
| const detail::ResourceLimits & | resource_limits () const |
| The resource budgets currently enforced while parsing. | |
| void | Reset () |
| Resets all internal pools and state for a new import/export operation. | |
| BinaryPool & | binary_pool () |
| std::array< uint8_t, 32 > & | header_hash () |
| const std::array< uint8_t, 32 > & | header_hash () const |
| void | Parse (std::istream &src, RandomObfuscator &obfuscator, Database &db) |
| Parses the full KDBX XML body from a stream. | |
| void | Write (std::ostream &dst, RandomObfuscator &obfuscator, const Database &db) |
| Writes the full KDBX XML body to a stream. | |
Parses and serializes the KDBX XML body.
The KDBX XML body contains the metadata (including custom icons and, for KDBX 3, the binary attachments), the groups with their entries and the deleted-objects tombstones. This class owns the pools (binaries, icons and groups by UUID reference) that are shared between the metadata, groups and the KDBX 4 inner header handling in KdbxFile.
The class is closely tied to KdbxFile, which drives the outer header, decryption and inner-header processing; it is used only internally by the library.
|
inline |
|
inline |
Header hash as carried inside the KDBX XML document (KDBX 3 only). The outer header processing in KdbxFile verifies resp. provides this value.
| void keepass::KdbxXml::Parse | ( | std::istream & | src, |
| RandomObfuscator & | obfuscator, | ||
| Database & | db | ||
| ) |
Parses the full KDBX XML body from a stream.
| src | The input stream containing the XML body. |
| obfuscator | The random stream obfuscator for decryption. |
| db | The database to populate with parsed data. |
| void keepass::KdbxXml::Write | ( | std::ostream & | dst, |
| RandomObfuscator & | obfuscator, | ||
| const Database & | db | ||
| ) |
Writes the full KDBX XML body to a stream.
| dst | The output stream to write the XML body to. |
| obfuscator | The random stream obfuscator for encryption. |
| db | The database to serialize. |