# GpgFrontend Project: src/core/model/GpgSubKey.h Source File

GpgSubKey.h
#ifndef GPGFRONTEND_GPGSUBKEY_H
#define GPGFRONTEND_GPGSUBKEY_H
#include <boost/date_time.hpp>
#include <string>
#include "core/GpgConstants.h"
namespace GpgFrontend {
class GPGFRONTEND_CORE_EXPORT GpgSubKey {
public:
[[nodiscard]] std::string GetID() const;
[[nodiscard]] std::string GetFingerprint() const;
[[nodiscard]] std::string GetPubkeyAlgo() const;
[[nodiscard]] unsigned int GetKeyLength() const;
[[nodiscard]] bool IsHasEncryptionCapability() const;
[[nodiscard]] bool IsHasSigningCapability() const;
[[nodiscard]] bool IsHasCertificationCapability() const;
[[nodiscard]] bool IsHasAuthenticationCapability() const;
[[nodiscard]] bool IsPrivateKey() const;
[[nodiscard]] bool IsExpired() const;
[[nodiscard]] bool IsRevoked() const;
[[nodiscard]] bool IsDisabled() const;
[[nodiscard]] bool IsSecretKey() const;
[[nodiscard]] bool IsCardKey() const;
[[nodiscard]] boost::posix_time::ptime GetCreateTime() const;
[[nodiscard]] boost::posix_time::ptime GetExpireTime() const;
GpgSubKey();
explicit GpgSubKey(gpgme_subkey_t subkey);
GpgSubKey(GpgSubKey&& o) noexcept;
GpgSubKey(const GpgSubKey&) = delete;
GpgSubKey& operator=(GpgSubKey&& o) noexcept;
GpgSubKey& operator=(const GpgSubKey&) = delete;
bool operator==(const GpgSubKey& o) const;
private:
using SubkeyRefHandler =
std::unique_ptr<struct _gpgme_subkey,
std::function<void(gpgme_subkey_t)>>;
SubkeyRefHandler _subkey_ref = nullptr;
};
} // namespace GpgFrontend
#endif // GPGFRONTEND_GPGSUBKEY_H
GpgFrontend::GpgSubKey
Definition: GpgSubKey.h:43
GpgFrontend::GpgSubKey::GpgSubKey
GpgSubKey()
Construct a new Gpg Sub Key object.
GpgFrontend::GpgSubKey::GpgSubKey
GpgSubKey(const GpgSubKey &)=delete
Construct a new Gpg Sub Key object.
GpgFrontend::GpgSubKey::operator=
GpgSubKey & operator=(const GpgSubKey &)=delete
GpgFrontend
Definition: CoreCommonUtil.cpp:31