GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgKeyImportExporter.h
1
29
#pragma once
30
31
#include "core/function/basic/GpgFunctionObject.h"
32
#include "core/function/gpg/GpgContext.h"
33
#include "core/model/GFBuffer.h"
34
#include "core/typedef/GpgTypedef.h"
35
36
namespace
GpgFrontend
{
37
38
class
GpgImportInformation;
39
44
class
GPGFRONTEND_CORE_EXPORT
GpgKeyImportExporter
45
:
public
SingletonFunctionObject
<GpgKeyImportExporter> {
46
public
:
52
explicit
GpgKeyImportExporter
(
53
int
channel =
SingletonFunctionObject::GetDefaultChannel
());
54
61
auto
ImportKey(
const
GFBuffer
&) -> std::shared_ptr<GpgImportInformation>;
62
71
[[nodiscard]]
auto
ExportKey(
const
GpgKey
& key,
bool
secret,
bool
ascii,
72
bool
shortest,
bool
ssh_mode =
false
)
const
73
-> std::tuple<GpgError, GFBuffer>;
74
84
void
ExportKeys(
const
KeyArgsList& keys,
bool
secret,
bool
ascii,
85
bool
shortest,
bool
ssh_mode,
86
const
GpgOperationCallback& cb)
const
;
87
96
void
ExportAllKeys(
const
KeyArgsList& keys,
bool
secret,
bool
ascii,
97
const
GpgOperationCallback& cb)
const
;
98
99
private
:
100
GpgContext
& ctx_;
101
};
102
103
}
// namespace GpgFrontend
GpgFrontend::GFBuffer
Definition:
GFBuffer.h:36
GpgFrontend::GpgContext
Definition:
GpgContext.h:58
GpgFrontend::GpgKeyImportExporter
Definition:
GpgKeyImportExporter.h:45
GpgFrontend::GpgKey
Definition:
GpgKey.h:40
GpgFrontend::SingletonFunctionObject
Definition:
GpgFunctionObject.h:58
GpgFrontend::SingletonFunctionObject::GetDefaultChannel
static auto GetDefaultChannel() -> int
Get the Default Channel object.
Definition:
GpgFunctionObject.h:131
GpgFrontend
Definition:
app.cpp:39
src
core
function
gpg
GpgKeyImportExporter.h
Generated by
1.9.1