aboutsummaryrefslogtreecommitdiff
path: root/autotests/testfilecrypto.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-05-31 19:16:23 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-05-31 19:16:23 +0200
commitec75d2d0e9601dcf32387120ca67135ac7e7f472 (patch)
tree146484ece089a8293dc30505b0c2380374e5fac7 /autotests/testfilecrypto.cpp
parent945b1ab33c92b7b13e2c6b6ebc1f56c5caee0f79 (diff)
parenta7c43995c3a47bbbac8d862f69f9229eb39f4ed6 (diff)
downloadlibquotient-ec75d2d0e9601dcf32387120ca67135ac7e7f472.tar.gz
libquotient-ec75d2d0e9601dcf32387120ca67135ac7e7f472.zip
Merge branch 'dev' into update-api-update
Diffstat (limited to 'autotests/testfilecrypto.cpp')
-rw-r--r--autotests/testfilecrypto.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/autotests/testfilecrypto.cpp b/autotests/testfilecrypto.cpp
index f9212376..29521060 100644
--- a/autotests/testfilecrypto.cpp
+++ b/autotests/testfilecrypto.cpp
@@ -3,15 +3,17 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
#include "testfilecrypto.h"
-#include "events/encryptedfile.h"
+
+#include "events/filesourceinfo.h"
+
#include <qtest.h>
using namespace Quotient;
void TestFileCrypto::encryptDecryptData()
{
QByteArray data = "ABCDEF";
- auto [file, cipherText] = EncryptedFile::encryptFile(data);
- auto decrypted = file.decryptFile(cipherText);
+ auto [file, cipherText] = encryptFile(data);
+ auto decrypted = decryptFile(cipherText, file);
// AES CTR produces ciphertext of the same size as the original
QCOMPARE(cipherText.size(), data.size());
QCOMPARE(decrypted.size(), data.size());