GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
|
29 #ifndef GPGFRONTEND_GPGSUBKEY_H
30 #define GPGFRONTEND_GPGSUBKEY_H
32 #include <boost/date_time.hpp>
35 #include "core/GpgConstants.h"
50 [[nodiscard]] std::string GetID()
const;
57 [[nodiscard]] std::string GetFingerprint()
const;
64 [[nodiscard]] std::string GetPubkeyAlgo()
const;
71 [[nodiscard]]
unsigned int GetKeyLength()
const;
79 [[nodiscard]]
bool IsHasEncryptionCapability()
const;
87 [[nodiscard]]
bool IsHasSigningCapability()
const;
95 [[nodiscard]]
bool IsHasCertificationCapability()
const;
103 [[nodiscard]]
bool IsHasAuthenticationCapability()
const;
111 [[nodiscard]]
bool IsPrivateKey()
const;
119 [[nodiscard]]
bool IsExpired()
const;
127 [[nodiscard]]
bool IsRevoked()
const;
135 [[nodiscard]]
bool IsDisabled()
const;
143 [[nodiscard]]
bool IsSecretKey()
const;
151 [[nodiscard]]
bool IsCardKey()
const;
158 [[nodiscard]] boost::posix_time::ptime GetCreateTime()
const;
165 [[nodiscard]] boost::posix_time::ptime GetExpireTime()
const;
178 explicit GpgSubKey(gpgme_subkey_t subkey);
215 bool operator==(
const GpgSubKey& o)
const;
218 using SubkeyRefHandler =
219 std::unique_ptr<
struct _gpgme_subkey,
220 std::function<void(gpgme_subkey_t)>>;
222 SubkeyRefHandler _subkey_ref = nullptr;
227 #endif // GPGFRONTEND_GPGSUBKEY_H
bool IsHasEncryptionCapability() const
Definition: GpgSubKey.cpp:63
bool operator==(const GpgSubKey &o) const
Definition: GpgSubKey.cpp:45
unsigned int GetKeyLength() const
Definition: GpgSubKey.cpp:59
Definition: CoreCommonUtil.cpp:29
GpgSubKey()
Construct a new Gpg Sub Key object.
std::string GetID() const
Definition: GpgSubKey.cpp:49
bool IsExpired() const
Definition: GpgSubKey.cpp:83
GpgSubKey & operator=(GpgSubKey &&o) noexcept
Definition: GpgSubKey.cpp:39
bool IsSecretKey() const
Definition: GpgSubKey.cpp:91
bool IsHasCertificationCapability() const
Definition: GpgSubKey.cpp:71
bool IsDisabled() const
Definition: GpgSubKey.cpp:87
std::string GetFingerprint() const
Definition: GpgSubKey.cpp:51
bool IsCardKey() const
Definition: GpgSubKey.cpp:93
boost::posix_time::ptime GetExpireTime() const
Definition: GpgSubKey.cpp:101
bool IsRevoked() const
Definition: GpgSubKey.cpp:85
Definition: GpgSubKey.h:43
bool IsHasAuthenticationCapability() const
Definition: GpgSubKey.cpp:75
std::string GetPubkeyAlgo() const
Definition: GpgSubKey.cpp:55
boost::posix_time::ptime GetCreateTime() const
Definition: GpgSubKey.cpp:97
bool IsPrivateKey() const
Definition: GpgSubKey.cpp:79
bool IsHasSigningCapability() const
Definition: GpgSubKey.cpp:67