// SPDX-FileCopyrightText: 2019 Alexey Andreyev // SPDX-License-Identifier: LGPL-2.1-or-later #ifdef Quotient_E2EE_ENABLED #pragma once #include #include #include namespace Quotient { class Connection; class QOlmAccount; struct EncryptedFile; class EncryptionManager : public QObject { Q_OBJECT public: explicit EncryptionManager(QObject* parent = nullptr); ~EncryptionManager(); QString sessionDecryptMessage(const QJsonObject& personalCipherObject, const QByteArray& senderKey, std::unique_ptr& account); static QByteArray decryptFile(const QByteArray &ciphertext, EncryptedFile* encryptedFile); private: class Private; std::unique_ptr d; }; } // namespace Quotient #endif // Quotient_E2EE_ENABLED