31 #include "core/GpgFrontendCoreExport.h"
37 using KeyGenAlgo = std::tuple<QString, QString, QString>;
45 explicit GenKeyInfo(
bool m_is_sub_key =
false);
52 static auto GetSupportedKeyAlgo() ->
const std::vector<KeyGenAlgo> &;
59 static auto GetSupportedSubkeyAlgo() ->
const std::vector<KeyGenAlgo> &;
67 [[nodiscard]]
auto IsSubKey()
const -> bool;
74 void SetIsSubKey(
bool m_sub_key);
81 [[nodiscard]]
auto GetUserid()
const -> QString;
88 void SetName(
const QString &m_name);
95 void SetEmail(
const QString &m_email);
102 void SetComment(
const QString &m_comment);
109 [[nodiscard]]
auto GetName()
const -> QString;
116 [[nodiscard]]
auto GetEmail()
const -> QString;
123 [[nodiscard]]
auto GetComment()
const -> QString;
130 [[nodiscard]]
auto GetAlgo()
const ->
const QString &;
137 void SetAlgo(
const QString &);
144 [[nodiscard]]
auto GetKeySizeStr()
const -> QString;
151 [[nodiscard]]
auto GetKeyLength()
const -> int;
158 void SetKeyLength(
int m_key_size);
165 [[nodiscard]]
auto GetExpireTime()
const ->
const QDateTime &;
172 void SetExpireTime(
const QDateTime &m_expired);
180 [[nodiscard]]
auto IsNonExpired()
const -> bool;
187 void SetNonExpired(
bool m_non_expired);
195 [[nodiscard]]
auto IsNoPassPhrase()
const -> bool;
202 void SetNonPassPhrase(
bool m_non_pass_phrase);
210 [[nodiscard]]
auto IsAllowSigning()
const -> bool;
218 [[nodiscard]]
auto IsAllowNoPassPhrase()
const -> bool;
225 void SetAllowSigning(
bool m_allow_signing);
233 [[nodiscard]]
auto IsAllowEncryption()
const -> bool;
240 void SetAllowEncryption(
bool m_allow_encryption);
248 [[nodiscard]]
auto IsAllowCertification()
const -> bool;
255 void SetAllowCertification(
bool m_allow_certification);
263 [[nodiscard]]
auto IsAllowAuthentication()
const -> bool;
270 void SetAllowAuthentication(
bool m_allow_authentication);
277 [[nodiscard]]
auto GetPassPhrase()
const ->
const QString &;
284 void SetPassPhrase(
const QString &m_pass_phrase);
292 [[nodiscard]]
auto IsAllowChangeSigning()
const -> bool;
300 [[nodiscard]]
auto IsAllowChangeEncryption()
const -> bool;
308 [[nodiscard]]
auto IsAllowChangeCertification()
const -> bool;
316 [[nodiscard]]
auto IsAllowChangeAuthentication()
const -> bool;
323 [[nodiscard]]
auto GetSuggestMaxKeySize()
const -> int;
330 [[nodiscard]]
auto GetSuggestMinKeySize()
const -> int;
337 [[nodiscard]]
auto GetSizeChangeStep()
const -> int;
340 bool subkey_ =
false;
346 int key_size_ = 2048;
347 QDateTime expired_ = QDateTime::currentDateTime().addYears(2);
348 bool non_expired_ =
false;
350 bool no_passphrase_ =
false;
351 bool allow_no_pass_phrase_ =
true;
353 int suggest_max_key_size_ = 4096;
354 int suggest_size_addition_step_ = 1024;
355 int suggest_min_key_size_ = 1024;
359 bool allow_encryption_ =
true;
360 bool allow_change_encryption_ =
true;
361 bool allow_certification_ =
true;
362 bool allow_change_certification_ =
true;
363 bool allow_authentication_ =
true;
364 bool allow_change_authentication_ =
true;
365 bool allow_signing_ =
true;
366 bool allow_change_signing_ =
true;
372 void reset_options();
Definition: GpgGenKeyInfo.h:35