1 /*
2     SPDX-FileCopyrightText: 2008, 2009, 2010, 2012, 2017 Rolf Eike Beer <kde@opensource.sf-tec.de>
3     SPDX-License-Identifier: GPL-2.0-or-later
4 */
5 
6 #ifndef KGPGCHANGEPASS_H
7 #define KGPGCHANGEPASS_H
8 
9 #include <QObject>
10 
11 #include "kgpgtransaction.h"
12 
13 /**
14  * @brief set a new passphrase for a key pair
15  */
16 class KGpgChangePass: public KGpgTransaction {
17 	Q_OBJECT
18 
19 	Q_DISABLE_COPY(KGpgChangePass)
20 public:
21     explicit KGpgChangePass(QObject *parent, const QString &keyid);
22     ~KGpgChangePass() override;
23 
24 protected:
25 	bool nextLine(const QString &line) override;
26 	bool preStart() override;
27 	bool passphraseRequested() override;
28 	bool passphraseReceived() override;
29 	bool hintLine(const KGpgTransaction::ts_hintType hint, const QString & args) override;
30 
31 private:
32 	bool m_seenold;		///< old password correctly entered
33 };
34 
35 #endif // KGPGCHANGEPASS_H
36