File indexing completed on 2024-05-05 05:53:22

0001 /*
0002     SPDX-FileCopyrightText: 2022 Rolf Eike Beer <kde@opensource.sf-tec.de>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef KGPGDELKEY_TEST_TRANSACTION_H
0007 #define KGPGDELKEY_TEST_TRANSACTION_H
0008 
0009 #include "../transactions/kgpggeneratekey.h"
0010 
0011 /**
0012  * Special version of the transaction that does not show a window for the
0013  * passphrase but just uses the one set in the constructor
0014  */
0015 class KGpgGenerateKeyTestTransaction : public KGpgGenerateKey {
0016     Q_OBJECT
0017 public:
0018     KGpgGenerateKeyTestTransaction(QObject *parent, const QString &name, const QString &email, const QString &comment,
0019                     const QByteArray &passphrase, const KgpgCore::KgpgKeyAlgo algorithm, const uint size);
0020     ~KGpgGenerateKeyTestTransaction() override = default;
0021 
0022     void askNewPassphrase(const QString &) override;
0023 
0024 private:
0025     const QByteArray m_passphrase;
0026 };
0027 
0028 #endif