OW_NAMESPACE::CryptographicRandomNumber Class Reference

#include <OW_CryptographicRandomNumber.hpp>

List of all members.

Public Member Functions

 CryptographicRandomNumber (Int32 lowVal=0, Int32 highVal=RAND_MAX)
Int32 getNextNumber ()
 
Exceptions:
CryptographicRandomNumberException on failure.


Static Public Member Functions

static void initRandomness ()
static void saveRandomState ()

Private Attributes

Int32 m_lowVal
Int32 m_highVal
Int32 m_range
int m_numBits


Detailed Description

Definition at line 56 of file OW_CryptographicRandomNumber.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::CryptographicRandomNumber::CryptographicRandomNumber Int32  lowVal = 0,
Int32  highVal = RAND_MAX
 

Definition at line 110 of file OW_CryptographicRandomNumber.cpp.

References OW_NAMESPACE::callOnce(), OW_NAMESPACE::guard, initRandomness(), and OW_ASSERT.


Member Function Documentation

Int32 OW_NAMESPACE::CryptographicRandomNumber::getNextNumber  ) 
 

Exceptions:
CryptographicRandomNumberException on failure.

The caller should treat this as a serious error.

Definition at line 122 of file OW_CryptographicRandomNumber.cpp.

References m_lowVal, m_numBits, m_range, and OW_THROW.

Referenced by OW_NAMESPACE::generateNewCookieFile(), OW_NAMESPACE::DigestAuthentication::generateNewNonce(), OW_NAMESPACE::ListenerAuthenticator::getNewCredentials(), OW_NAMESPACE::getRandomBytes(), and OW_NAMESPACE::FileSystem::initRandomFile().

void OW_NAMESPACE::CryptographicRandomNumber::initRandomness  )  [static]
 

Definition at line 564 of file OW_CryptographicRandomNumber.cpp.

References i, and names.

Referenced by CryptographicRandomNumber().

void OW_NAMESPACE::CryptographicRandomNumber::saveRandomState  )  [static]
 

Definition at line 727 of file OW_CryptographicRandomNumber.cpp.

References OW_NAMESPACE::FileSystem::Path::dirname(), MAXPATHLEN, OW_NAMESPACE::randFilePathIsSecure(), and OW_NAMESPACE::FileSystem::removeFile().


Member Data Documentation

Int32 OW_NAMESPACE::CryptographicRandomNumber::m_highVal [private]
 

Definition at line 76 of file OW_CryptographicRandomNumber.hpp.

Int32 OW_NAMESPACE::CryptographicRandomNumber::m_lowVal [private]
 

Definition at line 75 of file OW_CryptographicRandomNumber.hpp.

Referenced by getNextNumber().

int OW_NAMESPACE::CryptographicRandomNumber::m_numBits [private]
 

Definition at line 78 of file OW_CryptographicRandomNumber.hpp.

Referenced by getNextNumber().

Int32 OW_NAMESPACE::CryptographicRandomNumber::m_range [private]
 

Definition at line 77 of file OW_CryptographicRandomNumber.hpp.

Referenced by getNextNumber().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:13:37 2006 for openwbem by  doxygen 1.4.6