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;
Definition: GpgSubKey.h:43
GpgSubKey()
Construct a new Gpg Sub Key object.
GpgSubKey(const GpgSubKey &)=delete
Construct a new Gpg Sub Key object.
GpgSubKey & operator=(const GpgSubKey &)=delete
Definition: CoreCommonUtil.cpp:29