diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-29 12:46:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-29 12:46:11 +0200 |
commit | 346c36768e145435a54ce0ba6138af916410cbea (patch) | |
tree | fb78230a898754b2df982b890a4129839937f110 /autotests/testfilecrypto.cpp | |
parent | 729ba7da174eacc88bf9bd4e2e80eeab3fc92716 (diff) | |
parent | 0f8335a32debc4c61d9fc9875c79c0ba6ba05357 (diff) | |
download | libquotient-346c36768e145435a54ce0ba6138af916410cbea.tar.gz libquotient-346c36768e145435a54ce0ba6138af916410cbea.zip |
Merge pull request #556 from quotient-im/kitsune/fixes
Cleanup and refactoring
Diffstat (limited to 'autotests/testfilecrypto.cpp')
-rw-r--r-- | autotests/testfilecrypto.cpp | 8 |
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()); |