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())
 
- Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgFileOpera >
int GetChannel () const
 Get the Channel object. More...
 
 SingletonFunctionObject (GpgFileOpera &&)=delete
 Construct a new Singleton Function Object object.
 
 SingletonFunctionObject (const GpgFileOpera &)=delete
 Construct a new Singleton Function Object object.
 
void operator= (const GpgFileOpera &)=delete
 

Static Public Member Functions

static unsigned int EncryptFile (KeyListPtr keys, const std::string &in_path, const std::string &out_path, GpgEncrResult &result, int _channel=GPGFRONTEND_DEFAULT_CHANNEL)
 Encrypted file. More...
 
static unsigned int EncryptFileSymmetric (const std::string &in_path, const std::string &out_path, GpgEncrResult &result, int _channel=GPGFRONTEND_DEFAULT_CHANNEL)
 运用对称加密算法加密文件 More...
 
static GpgError DecryptFile (const std::string &in_path, const std::string &out_path, GpgDecrResult &result)
 
static GpgError SignFile (KeyListPtr keys, const std::string &in_path, const std::string &out_path, GpgSignResult &result, int _channel=GPGFRONTEND_DEFAULT_CHANNEL)
 
static GpgError VerifyFile (const std::string &data_path, const std::string &sign_path, GpgVerifyResult &result, int _channel=GPGFRONTEND_DEFAULT_CHANNEL)
 
static GpgError EncryptSignFile (KeyListPtr keys, KeyListPtr signer_keys, const std::string &in_path, const std::string &out_path, GpgEncrResult &encr_res, GpgSignResult &sign_res, int _channel=GPGFRONTEND_DEFAULT_CHANNEL)
 
static GpgError DecryptVerifyFile (const std::string &in_path, const std::string &out_path, GpgDecrResult &decr_res, GpgVerifyResult &verify_res)
 
- Static Public Member Functions inherited from GpgFrontend::SingletonFunctionObject< GpgFileOpera >
static GpgFileOperaGetInstance (int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
 Get the Instance object. More...
 
static GpgFileOperaCreateInstance (int channel, std::function< std::unique_ptr< GpgFileOpera >(void)> factory)
 Create a Instance object. More...
 
static GpgFileOperaCreateInstance (int channel, std::unique_ptr< GpgFileOpera > p_obj=nullptr)
 Create a Instance object. More...
 
static GpgFileOperaReleaseChannel (int channel)
 
static int GetDefaultChannel ()
 Get the Default Channel object. More...
 

Additional Inherited Members

- 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.
 
void SetChannel (int channel)
 Set the Channel object. More...
 

Constructor & Destructor Documentation

◆ GpgFileOpera()

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

Copyright (C) 2021 Saturneric

This file is part of GpgFrontend.

GpgFrontend is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

GpgFrontend is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GpgFrontend. If not, see https://www.gnu.org/licenses/.

The initial version of the source code is inherited from the gpg4usb project, which is under GPL-3.0-or-later.

All the source code of GpgFrontend was modified and released by Saturnericeric@.nosp@m.bktu.nosp@m.s.com starting on May 12, 2021.

SPDX-License-Identifier: GPL-3.0-or-later

Member Function Documentation

◆ DecryptFile()

GpgFrontend::GpgError GpgFrontend::GpgFileOpera::DecryptFile ( const std::string &  in_path,
const std::string &  out_path,
GpgDecrResult &  result 
)
static

◆ DecryptVerifyFile()

gpg_error_t GpgFrontend::GpgFileOpera::DecryptVerifyFile ( const std::string &  in_path,
const std::string &  out_path,
GpgDecrResult &  decr_res,
GpgVerifyResult &  verify_res 
)
static

◆ EncryptFile()

GpgFrontend::GpgError GpgFrontend::GpgFileOpera::EncryptFile ( KeyListPtr  keys,
const std::string &  in_path,
const std::string &  out_path,
GpgEncrResult &  result,
int  _channel = GPGFRONTEND_DEFAULT_CHANNEL 
)
static

Encrypted file.

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::check_gpg_error_2_err_code(), GpgFrontend::GpgBasicOperator::Encrypt(), GpgFrontend::SingletonFunctionObject< GpgBasicOperator >::GetInstance(), GpgFrontend::FileOperator::ReadFileStd(), and GpgFrontend::FileOperator::WriteFileStd().

Referenced by GpgFrontend::UI::MainWindow::SlotFileEncrypt().

◆ EncryptFileSymmetric()

unsigned int GpgFrontend::GpgFileOpera::EncryptFileSymmetric ( const std::string &  in_path,
const std::string &  out_path,
GpgFrontend::GpgEncrResult &  result,
int  _channel = GPGFRONTEND_DEFAULT_CHANNEL 
)
static

◆ EncryptSignFile()

gpg_error_t GpgFrontend::GpgFileOpera::EncryptSignFile ( KeyListPtr  keys,
KeyListPtr  signer_keys,
const std::string &  in_path,
const std::string &  out_path,
GpgEncrResult &  encr_res,
GpgSignResult &  sign_res,
int  _channel = GPGFRONTEND_DEFAULT_CHANNEL 
)
static

◆ SignFile()

gpgme_error_t GpgFrontend::GpgFileOpera::SignFile ( KeyListPtr  keys,
const std::string &  in_path,
const std::string &  out_path,
GpgSignResult &  result,
int  _channel = GPGFRONTEND_DEFAULT_CHANNEL 
)
static

◆ VerifyFile()

gpgme_error_t GpgFrontend::GpgFileOpera::VerifyFile ( const std::string &  data_path,
const std::string &  sign_path,
GpgVerifyResult &  result,
int  _channel = GPGFRONTEND_DEFAULT_CHANNEL 
)
static

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