aboutsummaryrefslogtreecommitdiff
path: root/autotests/testfilecrypto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'autotests/testfilecrypto.cpp')
-rw-r--r--autotests/testfilecrypto.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/autotests/testfilecrypto.cpp b/autotests/testfilecrypto.cpp
index e6bec1fe..f9212376 100644
--- a/autotests/testfilecrypto.cpp
+++ b/autotests/testfilecrypto.cpp
@@ -12,6 +12,9 @@ void TestFileCrypto::encryptDecryptData()
QByteArray data = "ABCDEF";
auto [file, cipherText] = EncryptedFile::encryptFile(data);
auto decrypted = file.decryptFile(cipherText);
- QCOMPARE(data, decrypted);
+ // AES CTR produces ciphertext of the same size as the original
+ QCOMPARE(cipherText.size(), data.size());
+ QCOMPARE(decrypted.size(), data.size());
+ QCOMPARE(decrypted, data);
}
QTEST_APPLESS_MAIN(TestFileCrypto)