GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
|
29 #ifndef _GPGKEYIMPORTEXPORTOR_H
30 #define _GPGKEYIMPORTEXPORTOR_H
34 #include "core/GpgConstants.h"
35 #include "core/GpgContext.h"
36 #include "core/GpgFunctionObject.h"
37 #include "core/GpgModel.h"
51 typedef std::list<GpgImportedKey> GpgImportedKeyList;
75 int new_signatures = 0;
76 int new_revocations = 0;
78 int secret_imported = 0;
79 int secret_unchanged = 0;
82 GpgImportedKeyList importedKeys;
117 bool ExportKeys(KeyIdArgsListPtr& uid_list, ByteArrayPtr& out_buffer,
118 bool secret =
false)
const;
129 bool ExportKeys(
const KeyArgsList& keys, ByteArrayPtr& outBuffer,
130 bool secret =
false)
const;
140 bool ExportKey(
const GpgKey& key, ByteArrayPtr& out_buffer)
const;
150 bool ExportKeyOpenSSH(
const GpgKey& key, ByteArrayPtr& out_buffer)
const;
160 bool ExportSecretKey(
const GpgKey& key, ByteArrayPtr& outBuffer)
const;
170 bool ExportSecretKeyShortest(
const GpgKey& key,
171 ByteArrayPtr& outBuffer)
const;
180 #endif // _GPGKEYIMPORTEXPORTOR_H
Definition: GpgFunctionObject.h:49
bool ExportKeys(KeyIdArgsListPtr &uid_list, ByteArrayPtr &out_buffer, bool secret=false) const
Definition: GpgKeyImportExporter.cpp:71
std::string GetId() const
Definition: GpgKey.cpp:54
Definition: CoreCommonUtil.cpp:29
static GpgKeyGetter & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:57
GPGFRONTEND_CORE_EXPORT GpgError check_gpg_error(GpgError err)
Definition: GpgConstants.cpp:55
GpgKeyImportExporter(int channel=SingletonFunctionObject::GetDefaultChannel())
Construct a new Gpg Key Import Exporter object.
Definition: GpgKeyImportExporter.cpp:34
int GetChannel() const
Get the Channel object.
Definition: GpgFunctionObject.h:134
Definition: GpgContext.h:59
Definition: GpgKeyImportExporter.h:45
static int GetDefaultChannel()
Get the Default Channel object.
Definition: GpgFunctionObject.h:127
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)
Definition: GpgConstants.cpp:64
ByteArrayPtr Read2Buffer()
Definition: GpgData.cpp:55
GpgImportInformation ImportKey(StdBypeArrayPtr inBuffer)
Definition: GpgKeyImportExporter.cpp:42
bool ExportKeyOpenSSH(const GpgKey &key, ByteArrayPtr &out_buffer) const
Definition: GpgKeyImportExporter.cpp:155
bool ExportSecretKey(const GpgKey &key, ByteArrayPtr &outBuffer) const
Definition: GpgKeyImportExporter.cpp:124
bool ExportSecretKeyShortest(const GpgKey &key, ByteArrayPtr &outBuffer) const
Definition: GpgKeyImportExporter.cpp:169
KeyListPtr GetKeys(const KeyIdArgsListPtr &ids)
Get the Keys object.
Definition: GpgKeyGetter.cpp:83
Definition: GpgKeyImportExporter.h:89
bool ExportKey(const GpgKey &key, ByteArrayPtr &out_buffer) const
Definition: GpgKeyImportExporter.cpp:141