GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
|
29 #ifndef _GPGKEYOPERA_H
30 #define _GPGKEYOPERA_H
32 #include "core/GpgConstants.h"
33 #include "core/GpgContext.h"
34 #include "core/GpgModel.h"
63 void DeleteKeys(KeyIdArgsListPtr key_ids);
70 void DeleteKey(
const KeyId& key_id);
80 GpgError SetExpire(
const GpgKey& key,
const SubkeyId& subkey_fpr,
81 std::unique_ptr<boost::posix_time::ptime>& expires);
89 static void GenerateRevokeCert(
const GpgKey& key,
90 const std::string& output_file_name);
98 GpgFrontend::GpgError ModifyPassword(
const GpgKey& key);
107 GpgFrontend::GpgError ModifyTOFUPolicy(
const GpgKey& key,
108 gpgme_tofu_policy_t tofu_policy);
116 GpgFrontend::GpgError GenerateKey(
const std::unique_ptr<GenKeyInfo>& params,
117 GpgGenKeyResult& result);
126 GpgFrontend::GpgError GenerateSubkey(
127 const GpgKey& key,
const std::unique_ptr<GenKeyInfo>& params);
135 #endif // _GPGKEYOPERA_H
std::string GetUserid() const
Get the Userid object.
Definition: GpgGenKeyInfo.h:114
Definition: GpgFunctionObject.h:159
static void GenerateRevokeCert(const GpgKey &key, const std::string &output_file_name)
Definition: GpgKeyOpera.cpp:106
const std::string & GetAlgo() const
Get the Algo object.
Definition: GpgGenKeyInfo.h:167
std::string GetId() const
Definition: GpgKey.cpp:54
Definition: CoreCommonUtil.cpp:29
static GpgKeyGetter & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:181
GPGFRONTEND_CORE_EXPORT GpgError check_gpg_error(GpgError err)
Definition: GpgConstants.cpp:55
Definition: GpgKeyOpera.h:47
int GetChannel() const
Get the Channel object.
Definition: GpgFunctionObject.h:252
GpgFrontend::GpgError GenerateSubkey(const GpgKey &key, const std::unique_ptr< GenKeyInfo > ¶ms)
Definition: GpgKeyOpera.cpp:245
GpgError SetExpire(const GpgKey &key, const SubkeyId &subkey_fpr, std::unique_ptr< boost::posix_time::ptime > &expires)
Set the Expire object.
Definition: GpgKeyOpera.cpp:76
Definition: GpgContext.h:59
GpgFrontend::GpgError GenerateKey(const std::unique_ptr< GenKeyInfo > ¶ms, GpgGenKeyResult &result)
Definition: GpgKeyOpera.cpp:166
GpgFrontend::GpgError ModifyPassword(const GpgKey &key)
Definition: GpgKeyOpera.cpp:276
static int GetDefaultChannel()
Get the Default Channel object.
Definition: GpgFunctionObject.h:245
GPGFRONTEND_CORE_EXPORT gpg_err_code_t check_gpg_error_2_err_code(gpgme_error_t err, gpgme_error_t predict=GPG_ERR_NO_ERROR)
Definition: GpgConstants.cpp:64
std::string GetKeySizeStr() const
Get the Key Size Str object.
Definition: GpgGenKeyInfo.cpp:154
bool IsSubKey() const
Definition: GpgGenKeyInfo.h:100
GpgKeyOpera(int channel=SingletonFunctionObject::GetDefaultChannel())
Construct a new Gpg Key Opera object.
Definition: GpgKeyOpera.cpp:44
void Execute(StringArgsRef arguments, const std::function< void(boost::process::async_pipe &in, boost::process::async_pipe &out)> &interact_func)
Excuting an order.
Definition: GpgCommandExecutor.cpp:41
GpgFrontend::GpgError ModifyTOFUPolicy(const GpgKey &key, gpgme_tofu_policy_t tofu_policy)
Definition: GpgKeyOpera.cpp:285
GpgKey GetKey(const std::string &id)
Get the Key object.
Definition: GpgKeyGetter.cpp:47
std::string GetFingerprint() const
Definition: GpgKey.cpp:70
GPGFRONTEND_CORE_EXPORT GpgEncrResult _new_result(gpgme_encrypt_result_t &&result)
Definition: GpgConstants.cpp:191
void DeleteKey(const KeyId &key_id)
Definition: GpgKeyOpera.cpp:295
void DeleteKeys(KeyIdArgsListPtr key_ids)
Definition: GpgKeyOpera.cpp:52