GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
|
Public Member Functions | |
GpgFileOpera (int channel=SingletonFunctionObject::GetDefaultChannel()) | |
Construct a new Gpg File Opera object. More... | |
void | EncryptFile (const KeyArgsList &keys, const QString &in_path, bool ascii, const QString &out_path, const GpgOperationCallback &cb) |
Encrypted file with public key. More... | |
auto | EncryptFileSync (const KeyArgsList &keys, const QString &in_path, bool ascii, const QString &out_path) -> std::tuple< GpgError, DataObjectPtr > |
void | EncryptDirectory (const KeyArgsList &keys, const QString &in_path, bool ascii, const QString &out_path, const GpgOperationCallback &cb) |
void | EncryptFileSymmetric (const QString &in_path, bool ascii, const QString &out_path, const GpgOperationCallback &cb) |
Encrypted file symmetrically (with password) More... | |
auto | EncryptFileSymmetricSync (const QString &in_path, bool ascii, const QString &out_path) -> std::tuple< GpgError, DataObjectPtr > |
void | EncryptDerectorySymmetric (const QString &in_path, bool ascii, const QString &out_path, const GpgOperationCallback &cb) |
auto | EncryptDerectorySymmetricSync (const QString &in_path, bool ascii, const QString &out_path) -> std::tuple< GpgError, DataObjectPtr > |
void | DecryptFile (const QString &in_path, const QString &out_path, const GpgOperationCallback &cb) |
auto | DecryptFileSync (const QString &in_path, const QString &out_path) -> std::tuple< GpgError, DataObjectPtr > |
void | DecryptArchive (const QString &in_path, const QString &out_path, const GpgOperationCallback &cb) |
void | SignFile (const KeyArgsList &keys, const QString &in_path, bool ascii, const QString &out_path, const GpgOperationCallback &cb) |
Sign file with private key. More... | |
auto | SignFileSync (const KeyArgsList &keys, const QString &in_path, bool ascii, const QString &out_path) -> std::tuple< GpgError, DataObjectPtr > |
void | VerifyFile (const QString &data_path, const QString &sign_path, const GpgOperationCallback &cb) |
Verify file with public key. More... | |
auto | VerifyFileSync (const QString &data_path, const QString &sign_path) -> std::tuple< GpgError, DataObjectPtr > |
void | EncryptSignFile (const KeyArgsList &keys, const KeyArgsList &signer_keys, const QString &in_path, bool ascii, const QString &out_path, const GpgOperationCallback &cb) |
auto | EncryptSignFileSync (const KeyArgsList &keys, const KeyArgsList &signer_keys, const QString &in_path, bool ascii, const QString &out_path) -> std::tuple< GpgError, DataObjectPtr > |
void | EncryptSignDirectory (const KeyArgsList &keys, const KeyArgsList &signer_keys, const QString &in_path, bool ascii, const QString &out_path, const GpgOperationCallback &cb) |
void | DecryptVerifyFile (const QString &in_path, const QString &out_path, const GpgOperationCallback &cb) |
auto | DecryptVerifyFileSync (const QString &in_path, const QString &out_path) -> std::tuple< GpgError, DataObjectPtr > |
void | DecryptVerifyArchive (const QString &in_path, const QString &out_path, const GpgOperationCallback &cb) |
Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgFileOpera > | |
SingletonFunctionObject (const SingletonFunctionObject< GpgFileOpera > &)=delete | |
prohibit copy | |
SingletonFunctionObject (GpgFileOpera &&)=delete | |
Construct a new Singleton Function Object object. | |
SingletonFunctionObject (const GpgFileOpera &)=delete | |
Construct a new Singleton Function Object object. | |
auto | operator= (const SingletonFunctionObject< GpgFileOpera > &) -> SingletonFunctionObject &=delete |
prohibit copy More... | |
void | operator= (const GpgFileOpera &)=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_ |
Corresponding context. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgFileOpera > | |
static auto | GetInstance (int channel=GpgFrontend::kGpgFrontendDefaultChannel) -> GpgFileOpera & |
Get the Instance object. More... | |
static auto | CreateInstance (int channel, const std::function< ChannelObjectPtr(void)> &factory) -> GpgFileOpera & |
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< GpgFileOpera > | |
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 File Opera object.
channel |
void GpgFrontend::GpgFileOpera::DecryptArchive | ( | const QString & | in_path, |
const QString & | out_path, | ||
const GpgOperationCallback & | cb | ||
) |
in_path | |
out_path | |
cb |
References GpgFrontend::CheckGpgError(), ctx_, GpgFrontend::ArchiveFileOperator::ExtractArchiveFromDataExchanger(), and GpgFrontend::RunGpgOperaAsync().
void GpgFrontend::GpgFileOpera::DecryptFile | ( | const QString & | in_path, |
const QString & | out_path, | ||
const GpgOperationCallback & | cb | ||
) |
in_path | |
out_path | |
result |
References GpgFrontend::CheckGpgError(), ctx_, and GpgFrontend::RunGpgOperaAsync().
auto GpgFrontend::GpgFileOpera::DecryptFileSync | ( | const QString & | in_path, |
const QString & | out_path | ||
) | -> std::tuple<GpgError, DataObjectPtr> |
in_path | |
out_path | |
cb |
References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaSync().
void GpgFrontend::GpgFileOpera::DecryptVerifyArchive | ( | const QString & | in_path, |
const QString & | out_path, | ||
const GpgOperationCallback & | cb | ||
) |
in_path | |
out_path | |
cb |
References GpgFrontend::CheckGpgError(), ctx_, GpgFrontend::ArchiveFileOperator::ExtractArchiveFromDataExchanger(), and GpgFrontend::RunGpgOperaAsync().
void GpgFrontend::GpgFileOpera::DecryptVerifyFile | ( | const QString & | in_path, |
const QString & | out_path, | ||
const GpgOperationCallback & | cb | ||
) |
in_path | |
out_path | |
decr_res | |
verify_res |
References GpgFrontend::CheckGpgError(), ctx_, and GpgFrontend::RunGpgOperaAsync().
auto GpgFrontend::GpgFileOpera::DecryptVerifyFileSync | ( | const QString & | in_path, |
const QString & | out_path | ||
) | -> std::tuple<GpgError, DataObjectPtr> |
in_path | |
out_path |
References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaSync().
void GpgFrontend::GpgFileOpera::EncryptDerectorySymmetric | ( | const QString & | in_path, |
bool | ascii, | ||
const QString & | out_path, | ||
const GpgOperationCallback & | cb | ||
) |
in_path | |
ascii | |
out_path | |
cb |
References GpgFrontend::CheckGpgError(), ctx_, GpgFrontend::ArchiveFileOperator::NewArchive2DataExchanger(), and GpgFrontend::RunGpgOperaAsync().
auto GpgFrontend::GpgFileOpera::EncryptDerectorySymmetricSync | ( | const QString & | in_path, |
bool | ascii, | ||
const QString & | out_path | ||
) | -> std::tuple<GpgError, DataObjectPtr> |
in_path | |
ascii | |
out_path |
References GpgFrontend::CheckGpgError(), GpgFrontend::ArchiveFileOperator::NewArchive2DataExchanger(), and GpgFrontend::RunGpgOperaSync().
void GpgFrontend::GpgFileOpera::EncryptDirectory | ( | const KeyArgsList & | keys, |
const QString & | in_path, | ||
bool | ascii, | ||
const QString & | out_path, | ||
const GpgOperationCallback & | cb | ||
) |
keys | |
in_path | |
ascii | |
out_path | |
cb |
References GpgFrontend::CheckGpgError(), ctx_, GpgFrontend::ArchiveFileOperator::NewArchive2DataExchanger(), and GpgFrontend::RunGpgOperaAsync().
void GpgFrontend::GpgFileOpera::EncryptFile | ( | const KeyArgsList & | keys, |
const QString & | in_path, | ||
bool | ascii, | ||
const QString & | out_path, | ||
const GpgOperationCallback & | cb | ||
) |
Encrypted file with public key.
keys | Used public key |
in_path | The path where the enter file is located |
out_path | The path where the output file is located |
result | Encrypted results |
channel | Channel in context |
References GpgFrontend::CheckGpgError(), ctx_, and GpgFrontend::RunGpgOperaAsync().
void GpgFrontend::GpgFileOpera::EncryptFileSymmetric | ( | const QString & | in_path, |
bool | ascii, | ||
const QString & | out_path, | ||
const GpgOperationCallback & | cb | ||
) |
Encrypted file symmetrically (with password)
in_path | |
out_path | |
result | |
channel |
References GpgFrontend::CheckGpgError(), ctx_, and GpgFrontend::RunGpgOperaAsync().
auto GpgFrontend::GpgFileOpera::EncryptFileSymmetricSync | ( | const QString & | in_path, |
bool | ascii, | ||
const QString & | out_path | ||
) | -> std::tuple<GpgError, DataObjectPtr> |
in_path | |
ascii | |
out_path | |
cb |
References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaSync().
auto GpgFrontend::GpgFileOpera::EncryptFileSync | ( | const KeyArgsList & | keys, |
const QString & | in_path, | ||
bool | ascii, | ||
const QString & | out_path | ||
) | -> std::tuple<GpgError, DataObjectPtr> |
keys | |
in_path | |
ascii | |
out_path |
References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaSync().
void GpgFrontend::GpgFileOpera::EncryptSignDirectory | ( | const KeyArgsList & | keys, |
const KeyArgsList & | signer_keys, | ||
const QString & | in_path, | ||
bool | ascii, | ||
const QString & | out_path, | ||
const GpgOperationCallback & | cb | ||
) |
keys | |
signer_keys | |
in_path | |
ascii | |
out_path | |
cb |
References GpgFrontend::CheckGpgError(), ctx_, GpgFrontend::SingletonFunctionObject< GpgBasicOperator >::GetInstance(), GpgFrontend::ArchiveFileOperator::NewArchive2DataExchanger(), and GpgFrontend::RunGpgOperaAsync().
void GpgFrontend::GpgFileOpera::EncryptSignFile | ( | const KeyArgsList & | keys, |
const KeyArgsList & | signer_keys, | ||
const QString & | in_path, | ||
bool | ascii, | ||
const QString & | out_path, | ||
const GpgOperationCallback & | cb | ||
) |
keys | |
signer_keys | |
in_path | |
ascii | |
out_path | |
cb |
References GpgFrontend::CheckGpgError(), ctx_, GpgFrontend::SingletonFunctionObject< GpgBasicOperator >::GetInstance(), and GpgFrontend::RunGpgOperaAsync().
auto GpgFrontend::GpgFileOpera::EncryptSignFileSync | ( | const KeyArgsList & | keys, |
const KeyArgsList & | signer_keys, | ||
const QString & | in_path, | ||
bool | ascii, | ||
const QString & | out_path | ||
) | -> std::tuple<GpgError, DataObjectPtr> |
keys | |
signer_keys | |
in_path | |
ascii | |
out_path |
References GpgFrontend::CheckGpgError(), GpgFrontend::SingletonFunctionObject< GpgBasicOperator >::GetInstance(), and GpgFrontend::RunGpgOperaSync().
void GpgFrontend::GpgFileOpera::SignFile | ( | const KeyArgsList & | keys, |
const QString & | in_path, | ||
bool | ascii, | ||
const QString & | out_path, | ||
const GpgOperationCallback & | cb | ||
) |
Sign file with private key.
keys | |
in_path | |
out_path | |
result | |
channel |
References GpgFrontend::CheckGpgError(), ctx_, GpgFrontend::SingletonFunctionObject< GpgBasicOperator >::GetInstance(), and GpgFrontend::RunGpgOperaAsync().
auto GpgFrontend::GpgFileOpera::SignFileSync | ( | const KeyArgsList & | keys, |
const QString & | in_path, | ||
bool | ascii, | ||
const QString & | out_path | ||
) | -> std::tuple<GpgError, DataObjectPtr> |
keys | |
in_path | |
ascii | |
out_path |
References GpgFrontend::CheckGpgError(), GpgFrontend::SingletonFunctionObject< GpgBasicOperator >::GetInstance(), and GpgFrontend::RunGpgOperaSync().
void GpgFrontend::GpgFileOpera::VerifyFile | ( | const QString & | data_path, |
const QString & | sign_path, | ||
const GpgOperationCallback & | cb | ||
) |
Verify file with public key.
data_path | The path where the enter file is located |
sign_path | The path where the signature file is located |
result | Verify results |
channel | Channel in context |
References GpgFrontend::CheckGpgError(), ctx_, and GpgFrontend::RunGpgOperaAsync().
auto GpgFrontend::GpgFileOpera::VerifyFileSync | ( | const QString & | data_path, |
const QString & | sign_path | ||
) | -> std::tuple<GpgError, DataObjectPtr> |
data_path | |
sign_path |
References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaSync().
|
private |
Corresponding context.
Referenced by DecryptArchive(), DecryptFile(), DecryptVerifyArchive(), DecryptVerifyFile(), EncryptDerectorySymmetric(), EncryptDirectory(), EncryptFile(), EncryptFileSymmetric(), EncryptSignDirectory(), EncryptSignFile(), SignFile(), and VerifyFile().