GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
|
Public Member Functions | |
GpgKeyOpera (int channel=SingletonFunctionObject::GetDefaultChannel()) | |
Construct a new Gpg Key Opera object. More... | |
void | DeleteKeys (KeyIdArgsListPtr key_ids) |
void | DeleteKey (const KeyId &key_id) |
auto | SetExpire (const GpgKey &key, const SubkeyId &subkey_fpr, std::unique_ptr< QDateTime > &expires) -> GpgError |
Set the Expire object. More... | |
void | GenerateRevokeCert (const GpgKey &key, const QString &output_path) |
void | ModifyPassword (const GpgKey &key, const GpgOperationCallback &) |
auto | ModifyTOFUPolicy (const GpgKey &key, gpgme_tofu_policy_t tofu_policy) -> GpgFrontend::GpgError |
void | GenerateKey (const std::shared_ptr< GenKeyInfo > &, const GpgOperationCallback &) |
auto | GenerateKeySync (const std::shared_ptr< GenKeyInfo > ¶ms) -> std::tuple< GpgError, DataObjectPtr > |
void | GenerateSubkey (const GpgKey &key, const std::shared_ptr< GenKeyInfo > ¶ms, const GpgOperationCallback &) |
auto | GenerateSubkeySync (const GpgKey &key, const std::shared_ptr< GenKeyInfo > ¶ms) -> std::tuple< GpgError, DataObjectPtr > |
void | GenerateKeyWithSubkey (const std::shared_ptr< GenKeyInfo > ¶ms, const std::shared_ptr< GenKeyInfo > &subkey_params, const GpgOperationCallback &callback) |
auto | GenerateKeyWithSubkeySync (const std::shared_ptr< GenKeyInfo > ¶ms, const std::shared_ptr< GenKeyInfo > &subkey_params) -> std::tuple< GpgError, DataObjectPtr > |
Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgKeyOpera > | |
SingletonFunctionObject (const SingletonFunctionObject< GpgKeyOpera > &)=delete | |
prohibit copy | |
SingletonFunctionObject (GpgKeyOpera &&)=delete | |
Construct a new Singleton Function Object object. | |
SingletonFunctionObject (const GpgKeyOpera &)=delete | |
Construct a new Singleton Function Object object. | |
auto | operator= (const SingletonFunctionObject< GpgKeyOpera > &) -> SingletonFunctionObject &=delete |
prohibit copy More... | |
void | operator= (const GpgKeyOpera &)=delete |
auto | GetChannel () const -> int |
Get the Channel object. More... | |
Public Member Functions inherited from GpgFrontend::ChannelObject | |
ChannelObject () noexcept | |
Construct a new Default Channel Object object. | |
virtual | ~ChannelObject () noexcept |
Destroy the Channel Object object. | |
ChannelObject (int channel, QString type) | |
Construct a new Channel Object object. More... | |
auto | GetChannel () const -> int |
Get the Channel object. More... | |
void | SetChannel (int channel) |
Set the Channel object. More... | |
Private Attributes | |
GpgContext & | ctx_ |
Additional Inherited Members | |
Static Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgKeyOpera > | |
static auto | GetInstance (int channel=GpgFrontend::kGpgFrontendDefaultChannel) -> GpgKeyOpera & |
Get the Instance object. More... | |
static auto | CreateInstance (int channel, const std::function< ChannelObjectPtr(void)> &factory) -> GpgKeyOpera & |
Create a Instance object. More... | |
static void | ReleaseChannel (int channel) |
static auto | GetDefaultChannel () -> int |
Get the Default Channel object. More... | |
static auto | GetAllChannelId () -> std::vector< int > |
Get all the channel ids. More... | |
Static Public Member Functions inherited from GpgFrontend::ChannelObject | |
static auto | GetDefaultChannel () -> int |
Get the Default Channel object. More... | |
Protected Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgKeyOpera > | |
SingletonFunctionObject ()=default | |
Construct a new Singleton Function Object object. | |
SingletonFunctionObject (int channel) | |
Construct a new Singleton Function Object object. More... | |
virtual | ~SingletonFunctionObject ()=default |
Destroy the Singleton Function Object object. | |
|
explicit |
Construct a new Gpg Key Opera object.
channel |
void GpgFrontend::GpgKeyOpera::DeleteKey | ( | const KeyId & | key_id | ) |
key_id |
References DeleteKeys().
void GpgFrontend::GpgKeyOpera::DeleteKeys | ( | KeyIdArgsListPtr | key_ids | ) |
key_ids | Delete keys |
uidList | key ids |
References GpgFrontend::CheckGpgError(), and GpgFrontend::SingletonFunctionObject< GpgKeyGetter >::GetInstance().
Referenced by DeleteKey().
void GpgFrontend::GpgKeyOpera::GenerateKey | ( | const std::shared_ptr< GenKeyInfo > & | params, |
const GpgOperationCallback & | callback | ||
) |
params | |
result |
Generate a new key pair
params | key generation args |
References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaAsync().
auto GpgFrontend::GpgKeyOpera::GenerateKeySync | ( | const std::shared_ptr< GenKeyInfo > & | params | ) | -> std::tuple<GpgError, DataObjectPtr> |
params |
References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaSync().
void GpgFrontend::GpgKeyOpera::GenerateKeyWithSubkey | ( | const std::shared_ptr< GenKeyInfo > & | params, |
const std::shared_ptr< GenKeyInfo > & | subkey_params, | ||
const GpgOperationCallback & | callback | ||
) |
params | |
subkey_params | |
callback |
References GpgFrontend::CheckGpgError(), GpgFrontend::SingletonFunctionObject< GpgKeyGetter >::GetInstance(), and GpgFrontend::RunGpgOperaAsync().
auto GpgFrontend::GpgKeyOpera::GenerateKeyWithSubkeySync | ( | const std::shared_ptr< GenKeyInfo > & | params, |
const std::shared_ptr< GenKeyInfo > & | subkey_params | ||
) | -> std::tuple<GpgError, DataObjectPtr> |
params | |
subkey_params | |
callback |
References GpgFrontend::CheckGpgError(), GpgFrontend::SingletonFunctionObject< GpgKeyGetter >::GetInstance(), and GpgFrontend::RunGpgOperaSync().
void GpgFrontend::GpgKeyOpera::GenerateRevokeCert | ( | const GpgKey & | key, |
const QString & | output_path | ||
) |
key | |
output_file_name | Generate revoke cert of a key pair |
key | target key pair |
outputFileName | out file name(path) |
References GpgFrontend::GpgCommandExecutor::ExecuteSync(), and GpgFrontend::GpgKey::GetFingerprint().
void GpgFrontend::GpgKeyOpera::GenerateSubkey | ( | const GpgKey & | key, |
const std::shared_ptr< GenKeyInfo > & | params, | ||
const GpgOperationCallback & | callback | ||
) |
key | |
params |
References GpgFrontend::CheckGpgError(), GpgFrontend::GpgKey::GetId(), and GpgFrontend::RunGpgOperaAsync().
auto GpgFrontend::GpgKeyOpera::GenerateSubkeySync | ( | const GpgKey & | key, |
const std::shared_ptr< GenKeyInfo > & | params | ||
) | -> std::tuple<GpgError, DataObjectPtr> |
key | |
params |
References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaSync().
void GpgFrontend::GpgKeyOpera::ModifyPassword | ( | const GpgKey & | key, |
const GpgOperationCallback & | callback | ||
) |
auto GpgFrontend::GpgKeyOpera::ModifyTOFUPolicy | ( | const GpgKey & | key, |
gpgme_tofu_policy_t | tofu_policy | ||
) | -> GpgFrontend::GpgError |
key | |
tofu_policy |
References GpgFrontend::CheckGpgError(), and GpgFrontend::CompareSoftwareVersion().
auto GpgFrontend::GpgKeyOpera::SetExpire | ( | const GpgKey & | key, |
const SubkeyId & | subkey_fpr, | ||
std::unique_ptr< QDateTime > & | expires | ||
) | -> GpgError |
Set the Expire object.
key | |
subkey_fpr | |
expires |
Set the expire date and time of a key pair(actually the primary key) or subkey
key | target key pair |
subkey | null if primary key |
expires | date and time |
|
private |