GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgFrontend::GenKeyInfo Class Reference
Collaboration diagram for GpgFrontend::GenKeyInfo:
Collaboration graph

Public Types

using KeyGenAlgo = std::tuple< QString, QString, QString >
 

Public Member Functions

 GenKeyInfo (bool m_is_sub_key=false)
 Construct a new Gen Key Info object. More...
 
auto IsSubKey () const -> bool
 
void SetIsSubKey (bool m_sub_key)
 Set the Is Sub Key object. More...
 
auto GetUserid () const -> QString
 Get the Userid object. More...
 
void SetName (const QString &m_name)
 Set the Name object. More...
 
void SetEmail (const QString &m_email)
 Set the Email object. More...
 
void SetComment (const QString &m_comment)
 Set the Comment object. More...
 
auto GetName () const -> QString
 Get the Name object. More...
 
auto GetEmail () const -> QString
 Get the Email object. More...
 
auto GetComment () const -> QString
 Get the Comment object. More...
 
auto GetAlgo () const -> const QString &
 Get the Algo object. More...
 
void SetAlgo (const QString &)
 Set the Algo object. More...
 
auto GetKeySizeStr () const -> QString
 Get the Key Size Str object. More...
 
auto GetKeyLength () const -> int
 Get the Key Size object. More...
 
void SetKeyLength (int m_key_size)
 Set the Key Size object. More...
 
auto GetExpireTime () const -> const QDateTime &
 Get the Expired object. More...
 
void SetExpireTime (const QDateTime &m_expired)
 Set the Expired object. More...
 
auto IsNonExpired () const -> bool
 
void SetNonExpired (bool m_non_expired)
 Set the Non Expired object. More...
 
auto IsNoPassPhrase () const -> bool
 
void SetNonPassPhrase (bool m_non_pass_phrase)
 Set the Non Pass Phrase object. More...
 
auto IsAllowSigning () const -> bool
 
auto IsAllowNoPassPhrase () const -> bool
 
void SetAllowSigning (bool m_allow_signing)
 Set the Allow Signing object. More...
 
auto IsAllowEncryption () const -> bool
 
void SetAllowEncryption (bool m_allow_encryption)
 Set the Allow Encryption object. More...
 
auto IsAllowCertification () const -> bool
 
void SetAllowCertification (bool m_allow_certification)
 Set the Allow Certification object. More...
 
auto IsAllowAuthentication () const -> bool
 
void SetAllowAuthentication (bool m_allow_authentication)
 Set the Allow Authentication object. More...
 
auto GetPassPhrase () const -> const QString &
 Get the Pass Phrase object. More...
 
void SetPassPhrase (const QString &m_pass_phrase)
 Set the Pass Phrase object. More...
 
auto IsAllowChangeSigning () const -> bool
 
auto IsAllowChangeEncryption () const -> bool
 
auto IsAllowChangeCertification () const -> bool
 
auto IsAllowChangeAuthentication () const -> bool
 
auto GetSuggestMaxKeySize () const -> int
 Get the Suggest Max Key Size object. More...
 
auto GetSuggestMinKeySize () const -> int
 Get the Suggest Min Key Size object. More...
 
auto GetSizeChangeStep () const -> int
 Get the Size Change Step object. More...
 

Static Public Member Functions

static auto GetSupportedKeyAlgo () -> const std::vector< KeyGenAlgo > &
 Get the Supported Key Algo object. More...
 
static auto GetSupportedSubkeyAlgo () -> const std::vector< KeyGenAlgo > &
 Get the Supported Subkey Algo object. More...
 

Private Member Functions

void reset_options ()
 

Private Attributes

bool subkey_ = false
 
QString name_
 
QString email_
 
QString comment_
 
QString algo_
 
int key_size_ = 2048
 
QDateTime expired_ = QDateTime::currentDateTime().addYears(2)
 
bool non_expired_ = false
 
bool no_passphrase_ = false
 
bool allow_no_pass_phrase_ = true
 
int suggest_max_key_size_ = 4096
 
int suggest_size_addition_step_ = 1024
 
int suggest_min_key_size_ = 1024
 
QString passphrase_
 
bool allow_encryption_ = true
 
bool allow_change_encryption_ = true
 
bool allow_certification_ = true
 
bool allow_change_certification_ = true
 
bool allow_authentication_ = true
 
bool allow_change_authentication_ = true
 
bool allow_signing_ = true
 
bool allow_change_signing_ = true
 

Constructor & Destructor Documentation

◆ GenKeyInfo()

GpgFrontend::GenKeyInfo::GenKeyInfo ( bool  m_is_sub_key = false)
explicit

Construct a new Gen Key Info object.

Parameters
m_is_sub_key
m_standalone

References GetSupportedKeyAlgo(), and SetAlgo().

Member Function Documentation

◆ GetAlgo()

auto GpgFrontend::GenKeyInfo::GetAlgo ( ) const -> const QString &

Get the Algo object.

Returns
const QString&

◆ GetComment()

auto GpgFrontend::GenKeyInfo::GetComment ( ) const -> QString

Get the Comment object.

Returns
QString

◆ GetEmail()

auto GpgFrontend::GenKeyInfo::GetEmail ( ) const -> QString

Get the Email object.

Returns
QString

◆ GetExpireTime()

auto GpgFrontend::GenKeyInfo::GetExpireTime ( ) const -> const QDateTime &

Get the Expired object.

Returns
const QDateTime&

◆ GetKeyLength()

auto GpgFrontend::GenKeyInfo::GetKeyLength ( ) const -> int

Get the Key Size object.

Returns
int

◆ GetKeySizeStr()

auto GpgFrontend::GenKeyInfo::GetKeySizeStr ( ) const -> QString

Get the Key Size Str object.

Returns
QString

◆ GetName()

auto GpgFrontend::GenKeyInfo::GetName ( ) const -> QString

Get the Name object.

Returns
QString

◆ GetPassPhrase()

auto GpgFrontend::GenKeyInfo::GetPassPhrase ( ) const -> const QString &

Get the Pass Phrase object.

Returns
const QString&

◆ GetSizeChangeStep()

auto GpgFrontend::GenKeyInfo::GetSizeChangeStep ( ) const -> int

Get the Size Change Step object.

Returns
int

◆ GetSuggestMaxKeySize()

auto GpgFrontend::GenKeyInfo::GetSuggestMaxKeySize ( ) const -> int

Get the Suggest Max Key Size object.

Returns
int

◆ GetSuggestMinKeySize()

auto GpgFrontend::GenKeyInfo::GetSuggestMinKeySize ( ) const -> int

Get the Suggest Min Key Size object.

Returns
int

◆ GetSupportedKeyAlgo()

auto GpgFrontend::GenKeyInfo::GetSupportedKeyAlgo ( ) -> const std::vector<KeyGenAlgo> &
static

Get the Supported Key Algo object.

Returns
const std::vector<QString>&

Referenced by GpgFrontend::UI::KeyGenDialog::create_basic_info_group_box(), and GenKeyInfo().

◆ GetSupportedSubkeyAlgo()

auto GpgFrontend::GenKeyInfo::GetSupportedSubkeyAlgo ( ) -> const std::vector<KeyGenAlgo> &
static

Get the Supported Subkey Algo object.

Returns
const std::vector<QString>&

Referenced by GpgFrontend::UI::SubkeyGenerateDialog::create_basic_info_group_box().

◆ GetUserid()

auto GpgFrontend::GenKeyInfo::GetUserid ( ) const -> QString

Get the Userid object.

Returns
QString

◆ IsAllowAuthentication()

auto GpgFrontend::GenKeyInfo::IsAllowAuthentication ( ) const -> bool
Returns
true
false

◆ IsAllowCertification()

auto GpgFrontend::GenKeyInfo::IsAllowCertification ( ) const -> bool
Returns
true
false

◆ IsAllowChangeAuthentication()

auto GpgFrontend::GenKeyInfo::IsAllowChangeAuthentication ( ) const -> bool
Returns
true
false

◆ IsAllowChangeCertification()

auto GpgFrontend::GenKeyInfo::IsAllowChangeCertification ( ) const -> bool
Returns
true
false

◆ IsAllowChangeEncryption()

auto GpgFrontend::GenKeyInfo::IsAllowChangeEncryption ( ) const -> bool
Returns
true
false

◆ IsAllowChangeSigning()

auto GpgFrontend::GenKeyInfo::IsAllowChangeSigning ( ) const -> bool
Returns
true
false

◆ IsAllowEncryption()

auto GpgFrontend::GenKeyInfo::IsAllowEncryption ( ) const -> bool
Returns
true
false

◆ IsAllowNoPassPhrase()

auto GpgFrontend::GenKeyInfo::IsAllowNoPassPhrase ( ) const -> bool
Returns
true
false

◆ IsAllowSigning()

auto GpgFrontend::GenKeyInfo::IsAllowSigning ( ) const -> bool
Returns
true
false

◆ IsNonExpired()

auto GpgFrontend::GenKeyInfo::IsNonExpired ( ) const -> bool
Returns
true
false

Referenced by SetExpireTime().

◆ IsNoPassPhrase()

auto GpgFrontend::GenKeyInfo::IsNoPassPhrase ( ) const -> bool
Returns
true
false

◆ IsSubKey()

auto GpgFrontend::GenKeyInfo::IsSubKey ( ) const -> bool
Returns
true
false

◆ SetAlgo()

void GpgFrontend::GenKeyInfo::SetAlgo ( const QString &  t_algo_args)

Set the Algo object.

Parameters
m_algo

RSA is the world’s premier asymmetric cryptographic algorithm, and is built on the difficulty of factoring extremely large composites. GnuPG supports RSA with key sizes of between 1024 and 4096 bits.

Algorithm (DSA) as a government standard for digital signatures. Originally, it supported key lengths between 512 and 1024 bits. Recently, NIST has declared 512-bit keys obsolete: now, DSA is available in 1024, 2048 and 3072-bit lengths.

GnuPG supports the Elgamal asymmetric encryption algorithm in key lengths ranging from 1024 to 4096 bits.

References SetAllowAuthentication(), SetAllowCertification(), SetAllowEncryption(), SetAllowSigning(), and SetKeyLength().

Referenced by GenKeyInfo().

◆ SetAllowAuthentication()

void GpgFrontend::GenKeyInfo::SetAllowAuthentication ( bool  m_allow_authentication)

Set the Allow Authentication object.

Parameters
m_allow_authentication

Referenced by SetAlgo().

◆ SetAllowCertification()

void GpgFrontend::GenKeyInfo::SetAllowCertification ( bool  m_allow_certification)

Set the Allow Certification object.

Parameters
m_allow_certification

Referenced by SetAlgo().

◆ SetAllowEncryption()

void GpgFrontend::GenKeyInfo::SetAllowEncryption ( bool  m_allow_encryption)

Set the Allow Encryption object.

Parameters
m_allow_encryption

Referenced by SetAlgo().

◆ SetAllowSigning()

void GpgFrontend::GenKeyInfo::SetAllowSigning ( bool  m_allow_signing)

Set the Allow Signing object.

Parameters
m_allow_signing

Referenced by SetAlgo().

◆ SetComment()

void GpgFrontend::GenKeyInfo::SetComment ( const QString &  m_comment)

Set the Comment object.

Parameters
m_comment

◆ SetEmail()

void GpgFrontend::GenKeyInfo::SetEmail ( const QString &  m_email)

Set the Email object.

Parameters
m_email

◆ SetExpireTime()

void GpgFrontend::GenKeyInfo::SetExpireTime ( const QDateTime &  m_expired)

Set the Expired object.

Parameters
m_expired

References IsNonExpired().

◆ SetIsSubKey()

void GpgFrontend::GenKeyInfo::SetIsSubKey ( bool  m_sub_key)

Set the Is Sub Key object.

Parameters
m_sub_key

◆ SetKeyLength()

void GpgFrontend::GenKeyInfo::SetKeyLength ( int  m_key_size)

Set the Key Size object.

Parameters
m_key_size

Referenced by SetAlgo().

◆ SetName()

void GpgFrontend::GenKeyInfo::SetName ( const QString &  m_name)

Set the Name object.

Parameters
m_name

◆ SetNonExpired()

void GpgFrontend::GenKeyInfo::SetNonExpired ( bool  m_non_expired)

Set the Non Expired object.

Parameters
m_non_expired

◆ SetNonPassPhrase()

void GpgFrontend::GenKeyInfo::SetNonPassPhrase ( bool  m_non_pass_phrase)

Set the Non Pass Phrase object.

Parameters
m_non_pass_phrase

◆ SetPassPhrase()

void GpgFrontend::GenKeyInfo::SetPassPhrase ( const QString &  m_pass_phrase)

Set the Pass Phrase object.

Parameters
m_pass_phrase

The documentation for this class was generated from the following files: