Libkleo

defaultkeygenerationjob.h
1/* This file is part of Kleopatra, the KDE keymanager
2 SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "kleo_export.h"
10
11#include <QGpgME/Job>
12
13#include <memory>
14
15namespace GpgME
16{
17class KeyGenerationResult;
18}
19
20namespace Kleo
21{
22
23/**
24 * Generates a PGP RSA/2048 bit key pair for given name and email address.
25 *
26 * @since 5.4
27 *
28 * This class is deprecated. GnuPG defaults to ECC keys and RSA 2048 is no
29 * longer allowed by some entities. Use QuickJob::startCreate from QGpgME
30 * instead.
31 */
32class KLEO_DEPRECATED_EXPORT DefaultKeyGenerationJob : public QGpgME::Job
33{
34 Q_OBJECT
35public:
36 explicit DefaultKeyGenerationJob(QObject *parent = nullptr);
37 ~DefaultKeyGenerationJob() override;
38
39 /**
40 * Set key passphrase
41 *
42 * Use this method to specify custom passphrase, including an empty
43 * one. If no passphrase (not even empty) is specified, gpg me will
44 * automatically prompt for passphrase using Pinentry dialog.
45 */
46 void setPassphrase(const QString &passphrase);
47
48 GpgME::Error start(const QString &email, const QString &name);
49
50 QString auditLogAsHtml() const override;
51 GpgME::Error auditLogError() const override;
52
53public Q_SLOTS:
54 void slotCancel() override;
55
56Q_SIGNALS:
57 void result(const GpgME::KeyGenerationResult &result, const QByteArray &pubkeyData, const QString &auditLogAsHtml, const GpgME::Error &auditLogError);
58
59protected:
60 bool eventFilter(QObject *watched, QEvent *event) override;
61
62private:
63 class DefaultKeyGenerationJobPrivate;
64 std::unique_ptr<DefaultKeyGenerationJobPrivate> const d;
65};
66
67}
Generates a PGP RSA/2048 bit key pair for given name and email address.
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:11 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.