35 using KeyGenAlgo = std::tuple<QString, QString, QString>;
43 explicit GenKeyInfo(
bool m_is_sub_key =
false);
50 static auto GetSupportedKeyAlgo() ->
const std::vector<KeyGenAlgo> &;
57 static auto GetSupportedSubkeyAlgo() ->
const std::vector<KeyGenAlgo> &;
65 [[nodiscard]]
auto IsSubKey()
const -> bool;
72 void SetIsSubKey(
bool m_sub_key);
79 [[nodiscard]]
auto GetUserid()
const -> QString;
86 void SetName(
const QString &m_name);
93 void SetEmail(
const QString &m_email);
100 void SetComment(
const QString &m_comment);
107 [[nodiscard]]
auto GetName()
const -> QString;
114 [[nodiscard]]
auto GetEmail()
const -> QString;
121 [[nodiscard]]
auto GetComment()
const -> QString;
128 [[nodiscard]]
auto GetAlgo()
const ->
const QString &;
135 void SetAlgo(
const QString &);
142 [[nodiscard]]
auto GetKeySizeStr()
const -> QString;
149 [[nodiscard]]
auto GetKeyLength()
const -> int;
156 void SetKeyLength(
int m_key_size);
163 [[nodiscard]]
auto GetExpireTime()
const ->
const QDateTime &;
170 void SetExpireTime(
const QDateTime &m_expired);
178 [[nodiscard]]
auto IsNonExpired()
const -> bool;
185 void SetNonExpired(
bool m_non_expired);
193 [[nodiscard]]
auto IsNoPassPhrase()
const -> bool;
200 void SetNonPassPhrase(
bool m_non_pass_phrase);
208 [[nodiscard]]
auto IsAllowSigning()
const -> bool;
216 [[nodiscard]]
auto IsAllowNoPassPhrase()
const -> bool;
223 void SetAllowSigning(
bool m_allow_signing);
231 [[nodiscard]]
auto IsAllowEncryption()
const -> bool;
238 void SetAllowEncryption(
bool m_allow_encryption);
246 [[nodiscard]]
auto IsAllowCertification()
const -> bool;
253 void SetAllowCertification(
bool m_allow_certification);
261 [[nodiscard]]
auto IsAllowAuthentication()
const -> bool;
268 void SetAllowAuthentication(
bool m_allow_authentication);
275 [[nodiscard]]
auto GetPassPhrase()
const ->
const QString &;
282 void SetPassPhrase(
const QString &m_pass_phrase);
290 [[nodiscard]]
auto IsAllowChangeSigning()
const -> bool;
298 [[nodiscard]]
auto IsAllowChangeEncryption()
const -> bool;
306 [[nodiscard]]
auto IsAllowChangeCertification()
const -> bool;
314 [[nodiscard]]
auto IsAllowChangeAuthentication()
const -> bool;
321 [[nodiscard]]
auto GetSuggestMaxKeySize()
const -> int;
328 [[nodiscard]]
auto GetSuggestMinKeySize()
const -> int;
335 [[nodiscard]]
auto GetSizeChangeStep()
const -> int;
338 bool subkey_ =
false;
344 int key_size_ = 2048;
345 QDateTime expired_ = QDateTime::currentDateTime().addYears(2);
346 bool non_expired_ =
false;
348 bool no_passphrase_ =
false;
349 bool allow_no_pass_phrase_ =
true;
351 int suggest_max_key_size_ = 4096;
352 int suggest_size_addition_step_ = 1024;
353 int suggest_min_key_size_ = 1024;
357 bool allow_encryption_ =
true;
358 bool allow_change_encryption_ =
true;
359 bool allow_certification_ =
true;
360 bool allow_change_certification_ =
true;
361 bool allow_authentication_ =
true;
362 bool allow_change_authentication_ =
true;
363 bool allow_signing_ =
true;
364 bool allow_change_signing_ =
true;
370 void reset_options();
Definition: GpgGenKeyInfo.h:33