diff options
Diffstat (limited to 'src/keys/FileKey.h')
-rw-r--r-- | src/keys/FileKey.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/keys/FileKey.h b/src/keys/FileKey.h index 290a04af0..540dde7d2 100644 --- a/src/keys/FileKey.h +++ b/src/keys/FileKey.h @@ -35,25 +35,25 @@ public: None, Hashed, KeePass2XML, + KeePass2XMLv2, FixedBinary, FixedBinaryHex }; FileKey(); ~FileKey() override; - bool load(QIODevice* device); + bool load(QIODevice* device, QString* errorMsg = nullptr); bool load(const QString& fileName, QString* errorMsg = nullptr); QByteArray rawKey() const override; Type type() const; - static void create(QIODevice* device, int size = 128); - static bool create(const QString& fileName, QString* errorMsg = nullptr, int size = 128); + static void createRandom(QIODevice* device, int size = 128); + static void createXMLv2(QIODevice* device, int size = 32); + static bool create(const QString& fileName, QString* errorMsg = nullptr); private: static constexpr int SHA256_SIZE = 32; - bool loadXml(QIODevice* device); - bool loadXmlMeta(QXmlStreamReader& xmlReader); - QByteArray loadXmlKey(QXmlStreamReader& xmlReader); + bool loadXml(QIODevice* device, QString* errorMsg = nullptr); bool loadBinary(QIODevice* device); bool loadHex(QIODevice* device); bool loadHashed(QIODevice* device); |