Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/TestKeys.cpp')
-rw-r--r--tests/TestKeys.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/TestKeys.cpp b/tests/TestKeys.cpp
index 6c1953faf..d5b35b1fb 100644
--- a/tests/TestKeys.cpp
+++ b/tests/TestKeys.cpp
@@ -83,6 +83,22 @@ void TestKeys::testComposite()
delete compositeKey4;
}
+void TestKeys::testCompositeKeyReadFromLine()
+{
+
+ QString keyFilename = QString("%1/FileKeyXml.key").arg(QString(KEEPASSX_TEST_DATA_DIR));
+
+ CompositeKey compositeFileKey = CompositeKey::readFromLine(keyFilename);
+ FileKey fileKey;
+ fileKey.load(keyFilename);
+ QCOMPARE(compositeFileKey.rawKey().size(), fileKey.rawKey().size());
+
+ CompositeKey compositePasswordKey = CompositeKey::readFromLine(QString("password"));
+ PasswordKey passwordKey(QString("password"));
+ QCOMPARE(compositePasswordKey.rawKey().size(), passwordKey.rawKey().size());
+
+}
+
void TestKeys::testFileKey()
{
QFETCH(QString, type);