GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgFrontend::GpgFileOpera Class Reference
Inheritance diagram for GpgFrontend::GpgFileOpera:
Inheritance graph
Collaboration diagram for GpgFrontend::GpgFileOpera:
Collaboration graph

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

GpgContextctx_
 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.
 

Constructor & Destructor Documentation

◆ GpgFileOpera()

GpgFrontend::GpgFileOpera::GpgFileOpera ( int  channel = SingletonFunctionObject::GetDefaultChannel())
explicit

Construct a new Gpg File Opera object.

Parameters
channel

Member Function Documentation

◆ DecryptArchive()

void GpgFrontend::GpgFileOpera::DecryptArchive ( const QString &  in_path,
const QString &  out_path,
const GpgOperationCallback &  cb 
)

◆ DecryptFile()

void GpgFrontend::GpgFileOpera::DecryptFile ( const QString &  in_path,
const QString &  out_path,
const GpgOperationCallback &  cb 
)
Parameters
in_path
out_path
result
Returns
GpgError

References GpgFrontend::CheckGpgError(), ctx_, and GpgFrontend::RunGpgOperaAsync().

◆ DecryptFileSync()

auto GpgFrontend::GpgFileOpera::DecryptFileSync ( const QString &  in_path,
const QString &  out_path 
) -> std::tuple<GpgError, DataObjectPtr>
Parameters
in_path
out_path
cb
Returns
std::tuple<GpgError, DataObjectPtr>

References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaSync().

◆ DecryptVerifyArchive()

void GpgFrontend::GpgFileOpera::DecryptVerifyArchive ( const QString &  in_path,
const QString &  out_path,
const GpgOperationCallback &  cb 
)

◆ DecryptVerifyFile()

void GpgFrontend::GpgFileOpera::DecryptVerifyFile ( const QString &  in_path,
const QString &  out_path,
const GpgOperationCallback &  cb 
)
Parameters
in_path
out_path
decr_res
verify_res
Returns
GpgError

References GpgFrontend::CheckGpgError(), ctx_, and GpgFrontend::RunGpgOperaAsync().

◆ DecryptVerifyFileSync()

auto GpgFrontend::GpgFileOpera::DecryptVerifyFileSync ( const QString &  in_path,
const QString &  out_path 
) -> std::tuple<GpgError, DataObjectPtr>
Parameters
in_path
out_path

References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaSync().

◆ EncryptDerectorySymmetric()

void GpgFrontend::GpgFileOpera::EncryptDerectorySymmetric ( const QString &  in_path,
bool  ascii,
const QString &  out_path,
const GpgOperationCallback &  cb 
)

◆ EncryptDerectorySymmetricSync()

auto GpgFrontend::GpgFileOpera::EncryptDerectorySymmetricSync ( const QString &  in_path,
bool  ascii,
const QString &  out_path 
) -> std::tuple<GpgError, DataObjectPtr>

◆ EncryptDirectory()

void GpgFrontend::GpgFileOpera::EncryptDirectory ( const KeyArgsList &  keys,
const QString &  in_path,
bool  ascii,
const QString &  out_path,
const GpgOperationCallback &  cb 
)

◆ EncryptFile()

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.

Parameters
keysUsed public key
in_pathThe path where the enter file is located
out_pathThe path where the output file is located
resultEncrypted results
channelChannel in context
Returns
unsigned int error code

References GpgFrontend::CheckGpgError(), ctx_, and GpgFrontend::RunGpgOperaAsync().

◆ EncryptFileSymmetric()

void GpgFrontend::GpgFileOpera::EncryptFileSymmetric ( const QString &  in_path,
bool  ascii,
const QString &  out_path,
const GpgOperationCallback &  cb 
)

Encrypted file symmetrically (with password)

Parameters
in_path
out_path
result
channel
Returns
unsigned int

References GpgFrontend::CheckGpgError(), ctx_, and GpgFrontend::RunGpgOperaAsync().

◆ EncryptFileSymmetricSync()

auto GpgFrontend::GpgFileOpera::EncryptFileSymmetricSync ( const QString &  in_path,
bool  ascii,
const QString &  out_path 
) -> std::tuple<GpgError, DataObjectPtr>
Parameters
in_path
ascii
out_path
cb

References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaSync().

◆ EncryptFileSync()

auto GpgFrontend::GpgFileOpera::EncryptFileSync ( const KeyArgsList &  keys,
const QString &  in_path,
bool  ascii,
const QString &  out_path 
) -> std::tuple<GpgError, DataObjectPtr>
Parameters
keys
in_path
ascii
out_path
Returns
std::tuple<GpgError, DataObjectPtr>

References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaSync().

◆ EncryptSignDirectory()

void GpgFrontend::GpgFileOpera::EncryptSignDirectory ( const KeyArgsList &  keys,
const KeyArgsList &  signer_keys,
const QString &  in_path,
bool  ascii,
const QString &  out_path,
const GpgOperationCallback &  cb 
)

◆ EncryptSignFile()

void GpgFrontend::GpgFileOpera::EncryptSignFile ( const KeyArgsList &  keys,
const KeyArgsList &  signer_keys,
const QString &  in_path,
bool  ascii,
const QString &  out_path,
const GpgOperationCallback &  cb 
)

◆ EncryptSignFileSync()

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>

◆ SignFile()

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.

Parameters
keys
in_path
out_path
result
channel
Returns
GpgError

References GpgFrontend::CheckGpgError(), ctx_, GpgFrontend::SingletonFunctionObject< GpgBasicOperator >::GetInstance(), and GpgFrontend::RunGpgOperaAsync().

◆ SignFileSync()

auto GpgFrontend::GpgFileOpera::SignFileSync ( const KeyArgsList &  keys,
const QString &  in_path,
bool  ascii,
const QString &  out_path 
) -> std::tuple<GpgError, DataObjectPtr>
Parameters
keys
in_path
ascii
out_path
Returns
std::tuple<GpgError, DataObjectPtr>

References GpgFrontend::CheckGpgError(), GpgFrontend::SingletonFunctionObject< GpgBasicOperator >::GetInstance(), and GpgFrontend::RunGpgOperaSync().

◆ VerifyFile()

void GpgFrontend::GpgFileOpera::VerifyFile ( const QString &  data_path,
const QString &  sign_path,
const GpgOperationCallback &  cb 
)

Verify file with public key.

Parameters
data_pathThe path where the enter file is located
sign_pathThe path where the signature file is located
resultVerify results
channelChannel in context
Returns
GpgError

References GpgFrontend::CheckGpgError(), ctx_, and GpgFrontend::RunGpgOperaAsync().

◆ VerifyFileSync()

auto GpgFrontend::GpgFileOpera::VerifyFileSync ( const QString &  data_path,
const QString &  sign_path 
) -> std::tuple<GpgError, DataObjectPtr>
Parameters
data_path
sign_path
Returns
std::tuple<GpgError, DataObjectPtr>

References GpgFrontend::CheckGpgError(), and GpgFrontend::RunGpgOperaSync().

Member Data Documentation

◆ ctx_

GpgContext& GpgFrontend::GpgFileOpera::ctx_
private
Initial value:
auto GetChannel() const -> int
Get the Channel object.
Definition: GpgFunctionObject.h:140
static auto GetInstance(int channel=GpgFrontend::kGpgFrontendDefaultChannel) -> GpgContext &
Get the Instance object.
Definition: GpgFunctionObject.h:80

Corresponding context.

Referenced by DecryptArchive(), DecryptFile(), DecryptVerifyArchive(), DecryptVerifyFile(), EncryptDerectorySymmetric(), EncryptDirectory(), EncryptFile(), EncryptFileSymmetric(), EncryptSignDirectory(), EncryptSignFile(), SignFile(), and VerifyFile().


The documentation for this class was generated from the following files: