GpgFrontend Project A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.

Namespaces | Classes | Typedefs | Functions | Variables
GpgFrontend Namespace Reference

## Namespaces
| RawAPI
| UI

## Classes
struct | _result_ref_deletor
| Result Deleter. More...
class | ArchiveFileOperator
struct | ArchiveStruct
class | CoreCommonUtil
class | CtxCheckThread
class | DataObjectOperator
class | FileOperator
| provides file operations More...
class | GenKeyInfo
class | GlobalSettingStation
class | GpgBasicOperator
| Basic operation collection. More...
class | GpgCommandExecutor
| Extra commands related to GPG. More...
class | GpgConstants
class | GpgContext
struct | GpgContextInitArgs
class | GpgData
class | GpgDecryptResultAnalyse
class | GpgEncryptResultAnalyse
class | GpgFileOpera
class | GpgImportedKey
class | GpgImportInformation
class | GpgInfo
| Use to record some info about gnupg. More...
class | GpgKey
class | GpgKeyGetter
class | GpgKeyImportExporter
class | GpgKeyManager
class | GpgKeyOpera
class | GpgKeySignature
class | GpgResultAnalyse
class | GpgSignature
class | GpgSignResultAnalyse
class | GpgSubKey
class | GpgTOFUInfo
class | GpgUID
class | GpgUIDOperator
class | GpgVerifyResultAnalyse
class | KeyPackageOperator
| give the possibility to import or export a key package More...
class | PassphraseGenerator
| The PassphraseGenerator class. More...
class | SingletonFunctionObject

## Typedefs
typedef std::list< GpgImportedKey > | GpgImportedKeyList
using | ByteArray = std::string
using | ByteArrayPtr = std::unique_ptr< ByteArray >
using | StdBypeArrayPtr = std::unique_ptr< ByteArray >
using | BypeArrayRef = ByteArray &
using | BypeArrayConstRef = const ByteArray &
using | StringArgsPtr = std::unique_ptr< std::vector< std::string > >
using | StringArgsRef = std::vector< std::string > &
using | GpgError = gpgme_error_t
using | GpgEncrResult = std::shared_ptr< struct _gpgme_op_encrypt_result >
using | GpgDecrResult = std::shared_ptr< struct _gpgme_op_decrypt_result >
using | GpgSignResult = std::shared_ptr< struct _gpgme_op_sign_result >
using | GpgVerifyResult = std::shared_ptr< struct _gpgme_op_verify_result >
using | GpgGenKeyResult = std::shared_ptr< struct _gpgme_op_genkey_result >
using | KeyId = std::string
using | SubkeyId = std::string
using | KeyIdArgsList = std::vector< KeyId >
using | KeyIdArgsListPtr = std::unique_ptr< KeyIdArgsList >
using | UIDArgsList = std::vector< std::string >
using | UIDArgsListPtr = std::unique_ptr< UIDArgsList >
using | SignIdArgsList = std::vector< std::pair< std::string, std::string > >
using | SignIdArgsListPtr = std::unique_ptr< SignIdArgsList >
using | KeyFprArgsListPtr = std::unique_ptr< std::vector< std::string > >
using | KeyArgsList = std::vector< GpgKey >
using | KeyListPtr = std::unique_ptr< KeyArgsList >
using | GpgKeyLinkList = std::list< GpgFrontend::GpgKey >
using | KeyLinkListPtr = std::unique_ptr< GpgKeyLinkList >
using | KeyPtr = std::unique_ptr< GpgKey >
using | KeyPtrArgsList = const std::initializer_list< KeyPtr >

## Functions
GPGFRONTEND_CORE_EXPORT GpgEncrResult | _new_result (gpgme_encrypt_result_t &&result)
GPGFRONTEND_CORE_EXPORT GpgDecrResult | _new_result (gpgme_decrypt_result_t &&result)
GPGFRONTEND_CORE_EXPORT GpgSignResult | _new_result (gpgme_sign_result_t &&result)
GPGFRONTEND_CORE_EXPORT GpgVerifyResult | _new_result (gpgme_verify_result_t &&result)
GPGFRONTEND_CORE_EXPORT GpgGenKeyResult | _new_result (gpgme_genkey_result_t &&result)
GPGFRONTEND_CORE_EXPORT GpgError | check_gpg_error (GpgError err)
GPGFRONTEND_CORE_EXPORT GpgError | check_gpg_error (GpgError gpgmeError, const std::string &comment)
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)
GPGFRONTEND_CORE_EXPORT std::string | beautify_fingerprint (BypeArrayConstRef fingerprint)
std::string | read_all_data_in_file (const std::string &path)
GPGFRONTEND_CORE_EXPORT bool | write_buffer_to_file (const std::string &path, const std::string &out_buffer)
std::string | get_file_extension (const std::string &path)
| Get the file extension object. More...
std::string | get_only_file_name_with_path (const std::string &path)
| Get the only file name with path object. More...
int | text_is_signed (BypeArrayRef text)
void | init_logging ()
| setup logging system and do proper initialization More...
void | init_gpgfrontend_core ()
void | new_default_settings_channel (int channel)

## Variables
const int | GPGFRONTEND_DEFAULT_CHANNEL = 0
const int | GPGFRONTEND_NON_ASCII_CHANNEL = 2

## Detailed Description

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.

The source code version of this software was modified and released by Saturnericeric@.nosp@m.bktu.nosp@m.s.com eric@.nosp@m.bktu.nosp@m.s.com starting on May 12, 2021.

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

## Function Documentation

## ◆ _new_result() [1/5]

GpgFrontend::GpgDecrResult GpgFrontend::_new_result | ( | gpgme_decrypt_result_t && | result | ) |

Parameters

  result |

Returns
  GpgDecrResult

## ◆ _new_result() [2/5]

GpgFrontend::GpgEncrResult GpgFrontend::_new_result | ( | gpgme_encrypt_result_t && | result | ) |

Parameters

  result |

Returns
  GpgEncrResult

Referenced by GpgFrontend::GpgBasicOperator::Decrypt(), GpgFrontend::GpgBasicOperator::DecryptVerify(), GpgFrontend::GpgBasicOperator::Encrypt(), GpgFrontend::GpgBasicOperator::EncryptSign(), GpgFrontend::GpgBasicOperator::EncryptSymmetric(), GpgFrontend::GpgKeyOpera::GenerateKey(), GpgFrontend::GpgBasicOperator::Sign(), and GpgFrontend::GpgBasicOperator::Verify().

## ◆ _new_result() [3/5]

GpgFrontend::GpgGenKeyResult GpgFrontend::_new_result | ( | gpgme_genkey_result_t && | result | ) |

Parameters

  result |

Returns
  GpgGenKeyResult

## ◆ _new_result() [4/5]

GpgFrontend::GpgSignResult GpgFrontend::_new_result | ( | gpgme_sign_result_t && | result | ) |

Parameters

  result |

Returns
  GpgSignResult

## ◆ _new_result() [5/5]

GpgFrontend::GpgVerifyResult GpgFrontend::_new_result | ( | gpgme_verify_result_t && | result | ) |

Parameters

  result |

Returns
  GpgVerifyResult

## ◆ beautify_fingerprint()

std::string GpgFrontend::beautify_fingerprint | ( | GpgFrontend::BypeArrayConstRef | fingerprint | ) |

Parameters

  fingerprint |

Returns
  std::string

Referenced by GpgFrontend::UI::VerifyKeyDetailBox::create_key_info_grid().

## ◆ check_gpg_error() [1/2]

gpgme_error_t GpgFrontend::check_gpg_error | ( | GpgError | err | ) |

Parameters

  err |

Returns
  GpgError

Referenced by GpgFrontend::GpgBasicOperator::Decrypt(), GpgFrontend::GpgBasicOperator::DecryptVerify(), GpgFrontend::GpgKeyOpera::DeleteKeys(), GpgFrontend::GpgBasicOperator::Encrypt(), GpgFrontend::GpgBasicOperator::EncryptSign(), GpgFrontend::GpgBasicOperator::EncryptSymmetric(), GpgFrontend::GpgKeyOpera::GenerateKey(), GpgFrontend::GpgKeyOpera::GenerateSubkey(), GpgFrontend::GpgContext::GpgContext(), GpgFrontend::GpgKeyImportExporter::ImportKey(), GpgFrontend::GpgContext::init_ctx(), GpgFrontend::GpgKeyOpera::ModifyPassword(), GpgFrontend::GpgKeyOpera::ModifyTOFUPolicy(), GpgFrontend::GpgKeyManager::RevSign(), GpgFrontend::GpgUIDOperator::RevUID(), GpgFrontend::GpgKeyManager::SetExpire(), GpgFrontend::GpgUIDOperator::SetPrimaryUID(), GpgFrontend::GpgBasicOperator::SetSigners(), GpgFrontend::GpgBasicOperator::Sign(), GpgFrontend::GpgKeyManager::SignKey(), and GpgFrontend::GpgBasicOperator::Verify().

## ◆ check_gpg_error() [2/2]

gpgme_error_t GpgFrontend::check_gpg_error | ( | GpgError | gpgmeError,
|  | const std::string & | comment
| ) |  |

Parameters

  gpgmeError |
  comment |

Returns
  GpgError

## ◆ check_gpg_error_2_err_code()

gpg_err_code_t GpgFrontend::check_gpg_error_2_err_code | ( | gpgme_error_t | err,
|  | gpgme_error_t | predict = `GPG_ERR_NO_ERROR`
| ) |  |

Parameters

  err |
  predict |

Returns
  gpg_err_code_t

Referenced by GpgFrontend::GpgUIDOperator::AddUID(), GpgFrontend::GpgFileOpera::DecryptFile(), GpgFrontend::GpgFileOpera::DecryptVerifyFile(), GpgFrontend::GpgFileOpera::EncryptFile(), GpgFrontend::GpgFileOpera::EncryptFileSymmetric(), GpgFrontend::GpgFileOpera::EncryptSignFile(), GpgFrontend::GpgKeyImportExporter::ExportKey(), GpgFrontend::GpgKeyImportExporter::ExportKeyOpenSSH(), GpgFrontend::GpgKeyImportExporter::ExportSecretKey(), GpgFrontend::GpgKeyImportExporter::ExportSecretKeyShortest(), GpgFrontend::GpgKeyGetter::FetchKey(), GpgFrontend::GpgKeyOpera::GenerateKey(), GpgFrontend::GpgContext::GpgContext(), GpgFrontend::GpgContext::init_ctx(), GpgFrontend::GpgKeyManager::RevSign(), GpgFrontend::GpgUIDOperator::RevUID(), GpgFrontend::GpgKeyManager::SetExpire(), GpgFrontend::GpgUIDOperator::SetPrimaryUID(), GpgFrontend::GpgFileOpera::SignFile(), GpgFrontend::GpgKeyManager::SignKey(), GpgFrontend::UI::MainWindow::slot_decrypt(), GpgFrontend::UI::MainWindow::slot_decrypt_verify(), GpgFrontend::UI::MainWindow::slot_encrypt(), GpgFrontend::UI::MainWindow::slot_encrypt_sign(), GpgFrontend::UI::SubkeyGenerateDialog::slot_key_gen_accept(), and GpgFrontend::UI::MainWindow::slot_sign().

## ◆ get_file_extension()

std::string GpgFrontend::get_file_extension | ( | const std::string & | path | ) |

Get the file extension object.

Parameters

  path |

Returns
  std::string

## ◆ get_only_file_name_with_path()

std::string GpgFrontend::get_only_file_name_with_path | ( | const std::string & | path | ) |

Get the only file name with path object.

Parameters

  path |

Returns
  std::string

## ◆ init_logging()

void GpgFrontend::init_logging | ( |  | ) |

setup logging system and do proper initialization

References GpgFrontend::SingletonFunctionObject< GlobalSettingStation >::GetInstance(), and GpgFrontend::GlobalSettingStation::GetLogDir().

## ◆ new_default_settings_channel()

void GpgFrontend::new_default_settings_channel | ( | int | channel = `GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL` | ) |

Parameters

  channel |

References GpgFrontend::SingletonFunctionObject< GpgContext >::CreateInstance().

## ◆ read_all_data_in_file()

std::string GpgFrontend::read_all_data_in_file | ( | const std::string & | path | ) |

Parameters

  path |

Returns
  std::string

## ◆ text_is_signed()

int GpgFrontend::text_is_signed | ( | GpgFrontend::BypeArrayRef | text | ) |

Parameters

  text |

Returns
  int

## ◆ write_buffer_to_file()

bool GpgFrontend::write_buffer_to_file | ( | const std::string & | path,
|  | const std::string & | out_buffer
| ) |  |

Parameters

  path |
  out_buffer |

Returns
  true
  false

Referenced by GpgFrontend::UI::KeyPairOperaTab::slot_export_private_key().