Bitcoin
Public Member Functions | Private Member Functions | Private Attributes | List of all members
anonymous_namespace{random.cpp}::RNGState Class Referenceabstract

Public Member Functions

 RNGState () noexcept
 
 ~RNGState ()
 
bool MixExtract (unsigned char *out, size_t num, CSHA512 &&hasher, bool strong_seed) noexcept
 
MutexGetOpenSSLMutex (int i)
 

Private Member Functions

unsigned char m_state [32] GUARDED_BY (m_mutex)
 
uint64_t m_counter GUARDED_BY (m_mutex)=0
 
bool m_strongly_seeded GUARDED_BY (m_mutex)
 

Private Attributes

Mutex m_mutex
 
std::unique_ptr< Mutex[]> m_mutex_openssl
 

Constructor & Destructor Documentation

◆ RNGState()

anonymous_namespace{random.cpp}::RNGState::RNGState ( )
inlinenoexcept

◆ ~RNGState()

anonymous_namespace{random.cpp}::RNGState::~RNGState ( )
inline

Member Function Documentation

◆ GetOpenSSLMutex()

Mutex& anonymous_namespace{random.cpp}::RNGState::GetOpenSSLMutex ( int  i)
inline

◆ GUARDED_BY() [1/3]

unsigned char m_state [32] anonymous_namespace{random.cpp}::RNGState::GUARDED_BY ( m_mutex  )
private

◆ GUARDED_BY() [2/3]

uint64_t m_counter anonymous_namespace{random.cpp}::RNGState::GUARDED_BY ( m_mutex  )
privatepure virtual

◆ GUARDED_BY() [3/3]

bool m_strongly_seeded anonymous_namespace{random.cpp}::RNGState::GUARDED_BY ( m_mutex  )
private

◆ MixExtract()

bool anonymous_namespace{random.cpp}::RNGState::MixExtract ( unsigned char *  out,
size_t  num,
CSHA512 &&  hasher,
bool  strong_seed 
)
inlinenoexcept

Extract up to 32 bytes of entropy from the RNG state, mixing in new entropy from hasher.

If this function has never been called with strong_seed = true, false is returned.

Member Data Documentation

◆ m_mutex

Mutex anonymous_namespace{random.cpp}::RNGState::m_mutex
private

◆ m_mutex_openssl

std::unique_ptr<Mutex[]> anonymous_namespace{random.cpp}::RNGState::m_mutex_openssl
private

The documentation for this class was generated from the following file: