Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Macros | Typedefs | Functions | Variables
secblock.h File Reference

Classes and functions for secure memory allocations. More...

#include "config.h"
#include "stdcpp.h"
#include "misc.h"
Include dependency graph for secblock.h:

Go to the source code of this file.

Classes

class  AllocatorBase< T >
 Base class for all allocators used by SecBlock. More...
 
class  AllocatorWithCleanup< T, T_Align16 >
 Allocates a block of memory with cleanup. More...
 
struct  AllocatorWithCleanup< T, T_Align16 >::rebind< U >
 Template class memeber Rebind. More...
 
class  NullAllocator< T >
 NULL allocator. More...
 
class  FixedSizeAllocatorWithCleanup< T, S, A, T_Align16 >
 Static secure memory block with cleanup. More...
 
class  SecBlock< T, A >
 Secure memory block with allocator and cleanup. More...
 
class  FixedSizeSecBlock< T, S, A >
 Fixed size stack-based SecBlock. More...
 
class  FixedSizeAlignedSecBlock< T, S, T_Align16 >
 Fixed size stack-based SecBlock with 16-byte alignment. More...
 
class  SecBlockWithHint< T, S, A >
 Stack-based SecBlock that grows into the heap. More...
 

Macros

#define CRYPTOPP_INHERIT_ALLOCATOR_TYPES
 

Typedefs

typedef SecBlock< byteSecByteBlock
 
typedef SecBlock< wordSecWordBlock
 
typedef SecBlock< byte, AllocatorWithCleanup< byte, true > > AlignedSecByteBlock
 

Functions

template<class T , class A >
A::pointer StandardReallocate (A &alloc, T *oldPtr, typename A::size_type oldSize, typename A::size_type newSize, bool preserve)
 Reallocation function. More...
 
template<class T , bool A, class U , bool B>
bool operator== (const CryptoPP::AllocatorWithCleanup< T, A > &, const CryptoPP::AllocatorWithCleanup< U, B > &)
 
template<class T , bool A, class U , bool B>
bool operator!= (const CryptoPP::AllocatorWithCleanup< T, A > &, const CryptoPP::AllocatorWithCleanup< U, B > &)
 
template<class T , class A >
NAMESPACE_END void swap (CryptoPP::SecBlock< T, A > &a, CryptoPP::SecBlock< T, A > &b)
 

Variables

CRYPTOPP_DLL_TEMPLATE_CLASS AllocatorWithCleanup< byte >
 
CRYPTOPP_DLL_TEMPLATE_CLASS AllocatorWithCleanup< word16 >
 
CRYPTOPP_DLL_TEMPLATE_CLASS AllocatorWithCleanup< word32 >
 
CRYPTOPP_DLL_TEMPLATE_CLASS AllocatorWithCleanup< word64 >
 

Detailed Description

Classes and functions for secure memory allocations.

Definition in file secblock.h.

Macro Definition Documentation

#define CRYPTOPP_INHERIT_ALLOCATOR_TYPES
Value:
typedef typename AllocatorBase<T>::value_type value_type;\
typedef typename AllocatorBase<T>::size_type size_type;\
typedef typename AllocatorBase<T>::difference_type difference_type;\
typedef typename AllocatorBase<T>::pointer pointer;\
typedef typename AllocatorBase<T>::const_pointer const_pointer;\
typedef typename AllocatorBase<T>::reference reference;\
typedef typename AllocatorBase<T>::const_reference const_reference;
T & reference
Definition: secblock.h:41
std::ptrdiff_t difference_type
Definition: secblock.h:37
const T * const_pointer
Definition: secblock.h:40
const T & const_reference
Definition: secblock.h:42
size_t size_type
Definition: secblock.h:33

Definition at line 99 of file secblock.h.

Typedef Documentation

Definition at line 741 of file secblock.h.

Definition at line 739 of file secblock.h.

Definition at line 740 of file secblock.h.

Function Documentation

template<class T , bool A, class U , bool B>
bool operator!= ( const CryptoPP::AllocatorWithCleanup< T, A > &  ,
const CryptoPP::AllocatorWithCleanup< U, B > &   
)
inline

Definition at line 786 of file secblock.h.

template<class T , bool A, class U , bool B>
bool operator== ( const CryptoPP::AllocatorWithCleanup< T, A > &  ,
const CryptoPP::AllocatorWithCleanup< U, B > &   
)
inline

Definition at line 784 of file secblock.h.

Here is the caller graph for this function:

template<class T , class A >
A::pointer StandardReallocate ( A &  alloc,
T oldPtr,
typename A::size_type  oldSize,
typename A::size_type  newSize,
bool  preserve 
)

Reallocation function.

Template Parameters
Tthe class or type
Athe class or type's allocator
Parameters
allocthe allocator
oldPtrthe previous allocation
oldSizethe size of the previous allocation
newSizethe new, requested size
preserveflag that indicates if the old allocation should be preserved
Note
oldSize and newSize are the count of elements, and not the number of bytes.

Definition at line 119 of file secblock.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , class A >
NAMESPACE_END void swap ( CryptoPP::SecBlock< T, A > &  a,
CryptoPP::SecBlock< T, A > &  b 
)
inline

Definition at line 792 of file secblock.h.

Variable Documentation

Definition at line 243 of file secblock.h.

Definition at line 244 of file secblock.h.

Definition at line 245 of file secblock.h.

Definition at line 246 of file secblock.h.