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  _key_ref_deleter
 

Public Member Functions

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

Private Types

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

Private Attributes

KeyRefHandler key_ref_ = nullptr
 

Constructor & Destructor Documentation

◆ GpgKey() [1/4]

GpgFrontend::GpgKey::GpgKey ( )
default

Construct a new Gpg Key object.

◆ GpgKey() [2/4]

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

Construct a new Gpg Key object.

Parameters
keyCopyright (C) 2021 Saturneric

This file is part of GpgFrontend.

GpgFrontend is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

GpgFrontend is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GpgFrontend. If not, see https://www.gnu.org/licenses/.

The initial version of the source code is inherited from the gpg4usb project, which is under GPL-3.0-or-later.

All the source code of GpgFrontend was modified and released by Saturnericeric@.nosp@m.bktu.nosp@m.s.com starting on May 12, 2021.

SPDX-License-Identifier: GPL-3.0-or-later

◆ ~GpgKey()

GpgFrontend::GpgKey::~GpgKey ( )
default

Destroy the Gpg Key objects.

◆ GpgKey() [3/4]

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

Construct a new Gpg Key object.

Parameters
key

◆ GpgKey() [4/4]

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

Construct a new Gpg Key object.

Parameters
k

Member Function Documentation

◆ Copy()

GpgFrontend::GpgKey GpgFrontend::GpgKey::Copy ( ) const
Returns
GpgKey

◆ GetComment()

std::string GpgFrontend::GpgKey::GetComment ( ) const
Returns
std::string

◆ GetCreateTime()

boost::posix_time::ptime GpgFrontend::GpgKey::GetCreateTime ( ) const

Create a time object.

Returns
boost::posix_time::ptime

◆ GetEmail()

◆ GetExpireTime()

boost::posix_time::ptime GpgFrontend::GpgKey::GetExpireTime ( ) const
Returns
boost::posix_time::ptime

◆ GetFingerprint()

std::string GpgFrontend::GpgKey::GetFingerprint ( ) const

◆ GetId()

◆ GetLastUpdateTime()

boost::posix_time::ptime GpgFrontend::GpgKey::GetLastUpdateTime ( ) const
Returns
boost::posix_time::ptime

◆ GetName()

◆ GetOwnerTrust()

std::string GpgFrontend::GpgKey::GetOwnerTrust ( ) const
Returns
std::string

◆ GetPrimaryKeyLength()

unsigned int GpgFrontend::GpgKey::GetPrimaryKeyLength ( ) const

s

Returns
unsigned int

◆ GetProtocol()

std::string GpgFrontend::GpgKey::GetProtocol ( ) const
Returns
std::string

◆ GetPublicKeyAlgo()

std::string GpgFrontend::GpgKey::GetPublicKeyAlgo ( ) const
Returns
std::string

◆ GetSubKeys()

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

◆ GetUIDs()

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

◆ IsDisabled()

◆ IsExpired()

◆ IsGood()

bool GpgFrontend::GpgKey::IsGood ( ) const

◆ IsHasActualAuthenticationCapability()

bool GpgFrontend::GpgKey::IsHasActualAuthenticationCapability ( ) const
Returns
true
false

◆ IsHasActualCertificationCapability()

bool GpgFrontend::GpgKey::IsHasActualCertificationCapability ( ) const
Returns
true
false

check if key can certify(actually)

Parameters
keytarget key
Returns
if key certify

◆ IsHasActualEncryptionCapability()

bool GpgFrontend::GpgKey::IsHasActualEncryptionCapability ( ) const
Returns
true
false

check if key can encrypt(actually)

Parameters
keytarget key
Returns
if key encrypt

◆ IsHasActualSigningCapability()

bool GpgFrontend::GpgKey::IsHasActualSigningCapability ( ) const
Returns
true
false

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

◆ IsHasAuthenticationCapability()

bool GpgFrontend::GpgKey::IsHasAuthenticationCapability ( ) const
Returns
true
false

◆ IsHasCardKey()

bool GpgFrontend::GpgKey::IsHasCardKey ( ) const
Returns
true
false

◆ IsHasCertificationCapability()

bool GpgFrontend::GpgKey::IsHasCertificationCapability ( ) const

◆ IsHasEncryptionCapability()

bool GpgFrontend::GpgKey::IsHasEncryptionCapability ( ) const
Returns
true
false

◆ IsHasMasterKey()

◆ IsHasSigningCapability()

bool GpgFrontend::GpgKey::IsHasSigningCapability ( ) const
Returns
true
false

◆ IsPrivateKey()

◆ IsRevoked()

◆ operator gpgme_key_t()

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

◆ operator<=()

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

References GetId().

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator==()

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

References GetId().


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