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

Classes

struct  KeyRefDeleter
 

Public Member Functions

auto IsGood () const -> bool
 
auto GetId () const -> QString
 
auto GetName () const -> QString
 
auto GetEmail () const -> QString
 
auto GetComment () const -> QString
 
auto GetFingerprint () const -> QString
 
auto GetProtocol () const -> QString
 
auto GetOwnerTrust () const -> QString
 
auto GetOwnerTrustLevel () const -> int
 
auto GetPublicKeyAlgo () const -> QString
 
auto GetKeyAlgo () const -> QString
 
auto GetLastUpdateTime () const -> QDateTime
 
auto GetExpireTime () const -> QDateTime
 
auto GetCreateTime () const -> QDateTime
 Create a time object. More...
 
auto GetPrimaryKeyLength () const -> unsigned int
 s More...
 
auto IsHasEncryptionCapability () const -> bool
 
auto IsHasActualEncryptionCapability () const -> bool
 
auto IsHasSigningCapability () const -> bool
 
auto IsHasActualSigningCapability () const -> bool
 
auto IsHasCertificationCapability () const -> bool
 
auto IsHasActualCertificationCapability () const -> bool
 
auto IsHasAuthenticationCapability () const -> bool
 
auto IsHasActualAuthenticationCapability () const -> bool
 
auto IsHasCardKey () const -> bool
 
auto IsPrivateKey () const -> bool
 
auto IsExpired () const -> bool
 
auto IsRevoked () const -> bool
 
auto IsDisabled () const -> bool
 
auto IsHasMasterKey () const -> bool
 
auto GetSubKeys () const -> std::unique_ptr< std::vector< GpgSubKey >>
 
auto GetUIDs () const -> std::unique_ptr< std::vector< GpgUID >>
 
 GpgKey ()=default
 Construct a new Gpg Key object.
 
 GpgKey (gpgme_key_t &&key)
 Construct a new Gpg Key object. More...
 
 ~GpgKey ()=default
 Destroy the Gpg Key objects.
 
 GpgKey (const gpgme_key_t &key)=delete
 Construct a new Gpg Key object. More...
 
 GpgKey (GpgKey &&) noexcept
 Construct a new Gpg Key object. More...
 
auto operator= (GpgKey &&) noexcept -> GpgKey &
 
 GpgKey (const GpgKey &)
 Construct a new Gpg Key object. More...
 
auto operator= (const GpgKey &) -> GpgKey &
 
auto operator= (const gpgme_key_t &) -> GpgKey &=delete
 
auto operator== (const GpgKey &) const -> bool
 
auto operator<= (const GpgKey &) const -> bool
 
 operator gpgme_key_t () const
 

Private Types

using KeyRefHandler = std::unique_ptr< struct _gpgme_key, KeyRefDeleter >
 

Private Attributes

KeyRefHandler key_ref_ = nullptr
 

Constructor & Destructor Documentation

◆ GpgKey() [1/4]

GpgFrontend::GpgKey::GpgKey ( gpgme_key_t &&  key)
explicit

Construct a new Gpg Key object.

Parameters
key

◆ GpgKey() [2/4]

GpgFrontend::GpgKey::GpgKey ( const gpgme_key_t &  key)
delete

Construct a new Gpg Key object.

Parameters
key

◆ GpgKey() [3/4]

GpgFrontend::GpgKey::GpgKey ( GpgKey &&  k)
noexcept

Construct a new Gpg Key object.

Parameters
k

◆ GpgKey() [4/4]

GpgFrontend::GpgKey::GpgKey ( const GpgKey key)

Construct a new Gpg Key object.

Parameters
k

Member Function Documentation

◆ GetComment()

auto GpgFrontend::GpgKey::GetComment ( ) const -> QString
Returns
QString

◆ GetCreateTime()

auto GpgFrontend::GpgKey::GetCreateTime ( ) const -> QDateTime

Create a time object.

Returns
QDateTime

◆ GetEmail()

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

◆ GetExpireTime()

auto GpgFrontend::GpgKey::GetExpireTime ( ) const -> QDateTime
Returns
QDateTime

◆ GetFingerprint()

auto GpgFrontend::GpgKey::GetFingerprint ( ) const -> QString
Returns
QString

Referenced by GpgFrontend::GpgKeyOpera::GenerateRevokeCert().

◆ GetId()

◆ GetKeyAlgo()

auto GpgFrontend::GpgKey::GetKeyAlgo ( ) const -> QString
Returns
QString

◆ GetLastUpdateTime()

auto GpgFrontend::GpgKey::GetLastUpdateTime ( ) const -> QDateTime
Returns
QDateTime

◆ GetName()

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

◆ GetOwnerTrust()

auto GpgFrontend::GpgKey::GetOwnerTrust ( ) const -> QString
Returns
QString

◆ GetOwnerTrustLevel()

auto GpgFrontend::GpgKey::GetOwnerTrustLevel ( ) const -> int
Returns
int

◆ GetPrimaryKeyLength()

auto GpgFrontend::GpgKey::GetPrimaryKeyLength ( ) const -> unsigned int

s

Returns
unsigned int

◆ GetProtocol()

auto GpgFrontend::GpgKey::GetProtocol ( ) const -> QString
Returns
QString

◆ GetPublicKeyAlgo()

auto GpgFrontend::GpgKey::GetPublicKeyAlgo ( ) const -> QString
Returns
QString

◆ GetSubKeys()

auto GpgFrontend::GpgKey::GetSubKeys ( ) const -> std::unique_ptr<std::vector<GpgSubKey>>

◆ GetUIDs()

auto GpgFrontend::GpgKey::GetUIDs ( ) const -> std::unique_ptr<std::vector<GpgUID>>
Returns
std::unique_ptr<std::vector<GpgUID>>

◆ IsDisabled()

◆ IsExpired()

◆ IsGood()

auto GpgFrontend::GpgKey::IsGood ( ) const -> bool
Returns
true
false

◆ IsHasActualAuthenticationCapability()

auto GpgFrontend::GpgKey::IsHasActualAuthenticationCapability ( ) const -> bool
Returns
true
false

References GetSubKeys().

◆ IsHasActualCertificationCapability()

auto GpgFrontend::GpgKey::IsHasActualCertificationCapability ( ) const -> bool
Returns
true
false

check if key can certify(actually)

Parameters
keytarget key
Returns
if key certify

References IsDisabled(), IsExpired(), IsHasMasterKey(), and IsRevoked().

◆ IsHasActualEncryptionCapability()

auto GpgFrontend::GpgKey::IsHasActualEncryptionCapability ( ) const -> bool
Returns
true
false

check if key can encrypt(actually)

Parameters
keytarget key
Returns
if key encrypt

References GetSubKeys().

◆ IsHasActualSigningCapability()

auto GpgFrontend::GpgKey::IsHasActualSigningCapability ( ) const -> bool
Returns
true
false

References GetSubKeys().

Referenced by GpgFrontend::UI::SignersPicker::SignersPicker().

◆ IsHasAuthenticationCapability()

auto GpgFrontend::GpgKey::IsHasAuthenticationCapability ( ) const -> bool
Returns
true
false

◆ IsHasCardKey()

auto GpgFrontend::GpgKey::IsHasCardKey ( ) const -> bool
Returns
true
false

References GetSubKeys().

◆ IsHasCertificationCapability()

auto GpgFrontend::GpgKey::IsHasCertificationCapability ( ) const -> bool

◆ IsHasEncryptionCapability()

auto GpgFrontend::GpgKey::IsHasEncryptionCapability ( ) const -> bool
Returns
true
false

◆ IsHasMasterKey()

◆ IsHasSigningCapability()

auto GpgFrontend::GpgKey::IsHasSigningCapability ( ) const -> bool
Returns
true
false

◆ IsPrivateKey()

◆ IsRevoked()

◆ operator gpgme_key_t()

GpgFrontend::GpgKey::operator gpgme_key_t ( ) const
explicit
Returns
gpgme_key_t

◆ operator<=()

auto GpgFrontend::GpgKey::operator<= ( const GpgKey o) const -> bool
Parameters
o
Returns
true
false

◆ operator=() [1/3]

auto GpgFrontend::GpgKey::operator= ( const GpgKey key) -> GpgKey&
Parameters
k
Returns
GpgKey&

◆ operator=() [2/3]

auto GpgFrontend::GpgKey::operator= ( const gpgme_key_t &  ) -> GpgKey &=delete
delete
Parameters
key
Returns
GpgKey&

◆ operator=() [3/3]

auto GpgFrontend::GpgKey::operator= ( GpgKey &&  k) -> GpgKey&
noexcept
Parameters
k
Returns
GpgKey&

◆ operator==()

auto GpgFrontend::GpgKey::operator== ( const GpgKey o) const -> bool
Parameters
o
Returns
true
false

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