Cuberite
A lightweight, fast and extensible game server for Minecraft
|
#include <CtrDrbgContext.h>
Public Member Functions | |
cCtrDrbgContext (const std::shared_ptr< cEntropyContext > &a_EntropyContext) | |
Constructs the context with the specified entropy context. More... | |
cCtrDrbgContext (void) | |
Constructs the context with a new entropy context. More... | |
int | Initialize (const void *a_Custom, size_t a_CustomSize) |
Initializes the context. More... | |
bool | IsValid (void) const |
Returns true if the object is valid (has been initialized properly) More... | |
Protected Member Functions | |
mbedtls_ctr_drbg_context * | GetInternal (void) |
Returns the internal context ptr. More... | |
Protected Attributes | |
mbedtls_ctr_drbg_context | m_CtrDrbg |
The random generator context. More... | |
std::shared_ptr< cEntropyContext > | m_EntropyContext |
The entropy source used for generating the random. More... | |
bool | m_IsValid |
Set to true if the object is valid (has been initialized properly) More... | |
Friends | |
class | cCryptoKey |
class | cRsaPrivateKey |
class | cSslConfig |
Definition at line 25 of file CtrDrbgContext.h.
cCtrDrbgContext::cCtrDrbgContext | ( | void | ) |
Constructs the context with a new entropy context.
Definition at line 14 of file CtrDrbgContext.cpp.
cCtrDrbgContext::cCtrDrbgContext | ( | const std::shared_ptr< cEntropyContext > & | a_EntropyContext | ) |
Constructs the context with the specified entropy context.
Definition at line 25 of file CtrDrbgContext.cpp.
|
inlineprotected |
Returns the internal context ptr.
Only use in mbedTLS API calls.
Definition at line 58 of file CtrDrbgContext.h.
int cCtrDrbgContext::Initialize | ( | const void * | a_Custom, |
size_t | a_CustomSize | ||
) |
Initializes the context.
a_Custom is optional additional data to use for entropy, nullptr is accepted. Returns 0 if successful, mbedTLS error code on failure.
Definition at line 36 of file CtrDrbgContext.cpp.
|
inline |
Returns true if the object is valid (has been initialized properly)
Definition at line 44 of file CtrDrbgContext.h.
|
friend |
Definition at line 29 of file CtrDrbgContext.h.
|
friend |
Definition at line 28 of file CtrDrbgContext.h.
|
friend |
Definition at line 27 of file CtrDrbgContext.h.
|
protected |
The random generator context.
Definition at line 51 of file CtrDrbgContext.h.
|
protected |
The entropy source used for generating the random.
Definition at line 48 of file CtrDrbgContext.h.
|
protected |
Set to true if the object is valid (has been initialized properly)
Definition at line 54 of file CtrDrbgContext.h.