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

give the possibility to import or export a key package More...

#include <KeyPackageOperator.h>

Collaboration diagram for GpgFrontend::KeyPackageOperator:
Collaboration graph

Static Public Member Functions

static auto GeneratePassphrase (const QString &phrase_path, QString &phrase) -> bool
 generate passphrase for key package and save it to file More...
 
static auto GenerateKeyPackageName () -> QString
 generate the name of the key package More...
 
static void GenerateKeyPackage (const QString &key_package_path, const QString &key_package_name, const KeyArgsList &keys, QString &phrase, bool secret, const OperationCallback &cb)
 generate key package More...
 
static void ImportKeyPackage (const QString &key_package_path, const QString &phrase_path, const OperationCallback &cb)
 import key package More...
 

Static Private Member Functions

static auto generate_key_package_name () -> QString
 generate key package name More...
 

Detailed Description

give the possibility to import or export a key package

Member Function Documentation

◆ generate_key_package_name()

auto GpgFrontend::KeyPackageOperator::generate_key_package_name ( ) -> QString
staticprivate

generate key package name

Returns
QString key package name

◆ GenerateKeyPackage()

void GpgFrontend::KeyPackageOperator::GenerateKeyPackage ( const QString &  key_package_path,
const QString &  key_package_name,
const KeyArgsList &  keys,
QString &  phrase,
bool  secret,
const OperationCallback &  cb 
)
static

generate key package

Parameters
key_package_pathpath to key package
key_package_namename of the key package
key_idskey ids to export
phrasepassphrase to encrypt key package
secrettrue if secret key should be exported
Returns
true if key package was generated
false if key package was not generated

References GpgFrontend::CheckGpgError(), GpgFrontend::DescribeGpgErrCode(), GpgFrontend::SingletonFunctionObject< GpgKeyImportExporter >::GetInstance(), and GpgFrontend::WriteFile().

◆ GenerateKeyPackageName()

auto GpgFrontend::KeyPackageOperator::GenerateKeyPackageName ( ) -> QString
static

generate the name of the key package

Returns
QString name of the key package

Referenced by GpgFrontend::UI::ExportKeyPackageDialog::ExportKeyPackageDialog().

◆ GeneratePassphrase()

auto GpgFrontend::KeyPackageOperator::GeneratePassphrase ( const QString &  phrase_path,
QString &  phrase 
) -> bool
static

generate passphrase for key package and save it to file

Parameters
phrase_pathpath to passphrase file
phrasepassphrase generated
Returns
true if passphrase was generated and saved
false if passphrase was not generated and saved

References GpgFrontend::SingletonFunctionObject< PassphraseGenerator >::GetInstance(), and GpgFrontend::WriteFile().

◆ ImportKeyPackage()

void GpgFrontend::KeyPackageOperator::ImportKeyPackage ( const QString &  key_package_path,
const QString &  phrase_path,
const OperationCallback &  cb 
)
static

import key package

Parameters
key_package_pathpath to key package
phrase_pathpath to passphrase file
import_infoimport info
Returns
true if key package was imported
false if key package was not imported

References GpgFrontend::SingletonFunctionObject< GpgKeyImportExporter >::GetInstance(), GpgFrontend::ReadFile(), and GpgFrontend::RunOperaAsync().


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