GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
g
i
k
l
p
r
s
t
u
w
Functions
a
b
c
d
g
i
l
p
r
s
t
u
w
Variables
Typedefs
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
a
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
z
Files
File List
▼
GpgFrontend Project
GpgFrontend Develop Document Main Page
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
src
▼
core
▼
function
►
basic
►
gpg
►
result_analyse
ArchiveFileOperator.h
CacheManager.h
CoreSignalStation.h
DataObjectOperator.h
GlobalSettingStation.h
KeyPackageOperator.h
LoggerManager.h
PassphraseGenerator.h
SecureMemoryAllocator.h
►
log
►
model
►
module
►
thread
►
typedef
►
utils
GpgConstants.h
GpgCoreInit.h
GpgFrontendCore.h
GpgModel.h
►
module
►
pinentry
►
test
►
ui
app.h
cmd.h
GpgFrontendContext.h
init.h
main.h
•
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Pages
SecureMemoryAllocator.h
1
29
#pragma once
30
31
#include <cstdint>
32
#include <memory>
33
34
#include "core/utils/LogUtils.h"
35
36
namespace
GpgFrontend
{
37
38
class
GPGFRONTEND_CORE_EXPORT
SecureMemoryAllocator
{
39
public
:
40
static
auto
Allocate(std::size_t) ->
void
*;
41
42
static
auto
Reallocate(
void
*, std::size_t) ->
void
*;
43
44
static
void
Deallocate(
void
*);
45
};
46
47
template
<
typename
T>
48
struct
SecureObjectDeleter
{
49
void
operator()(T *ptr) {
50
if
(ptr) {
51
ptr->~T();
52
SecureMemoryAllocator::Deallocate(ptr);
53
}
54
}
55
};
56
57
template
<
typename
T>
58
using
SecureUniquePtr = std::unique_ptr<T, SecureObjectDeleter<T>>;
59
60
}
// namespace GpgFrontend
GpgFrontend::SecureMemoryAllocator
Definition:
SecureMemoryAllocator.h:38
GpgFrontend
Definition:
app.cpp:39
GpgFrontend::SecureObjectDeleter
Definition:
SecureMemoryAllocator.h:48
src
core
function
SecureMemoryAllocator.h
Generated by
1.9.1