blob: e6bec1fef8676db239d1fd49282d1b6fc00e2330 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// SPDX-FileCopyrightText: 2022 Tobias Fella <fella@posteo.de>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
#include "testfilecrypto.h"
#include "events/encryptedfile.h"
#include <qtest.h>
using namespace Quotient;
void TestFileCrypto::encryptDecryptData()
{
QByteArray data = "ABCDEF";
auto [file, cipherText] = EncryptedFile::encryptFile(data);
auto decrypted = file.decryptFile(cipherText);
QCOMPARE(data, decrypted);
}
QTEST_APPLESS_MAIN(TestFileCrypto)
|