Integrate KeePass2RandomStream into KeePass2 reader and writer classes.

This hopefully completes support for reading/writing kdbx <= 2.14 files.

Also fix a bug in KeePass2XmlWriter so it sets Protected="True" in the Value
tag instead of Key.
This commit is contained in:
Felix Geyer
2011-07-07 00:15:52 +02:00
parent 58e048be96
commit a299dd9715
12 changed files with 200 additions and 45 deletions

View File

@@ -29,15 +29,15 @@
#include "core/Uuid.h"
class Group;
class KeePass2RandomStream;
class Metadata;
class SymmetricCipher;
class KeePass2XmlWriter
{
public:
KeePass2XmlWriter();
void writeDatabase(QIODevice* device, Database* db, SymmetricCipher* cipher = 0);
void writeDatabase(const QString& filename, Database* db, SymmetricCipher* cipher = 0);
void writeDatabase(QIODevice* device, Database* db, KeePass2RandomStream* randomStream = 0);
void writeDatabase(const QString& filename, Database* db, KeePass2RandomStream* randomStream = 0);
bool error();
QString errorString();
@@ -72,7 +72,7 @@ private:
QXmlStreamWriter m_xml;
Database* m_db;
Metadata* m_meta;
SymmetricCipher* m_cipher;
KeePass2RandomStream* m_randomStream;
};
#endif // KEEPASSX_KEEPASS2XMLWRITER_H