decaf::internal::security::SecureRandomImpl Class Reference

Secure Random Number Generator for Unix based platforms that attempts to obtain secure bytes with high entropy from known sources. More...

#include <src/main/decaf/internal/security/unix/SecureRandomImpl.h>

Inheritance diagram for decaf::internal::security::SecureRandomImpl:
Inheritance graph
[legend]

Public Member Functions

 SecureRandomImpl ()
virtual ~SecureRandomImpl ()
virtual void providerSetSeed (const unsigned char *seed, int size)
 Reseed the Random Number Generator, the value given supplements the previous seed value if any instead of replacing it.
virtual void providerNextBytes (unsigned char *bytes, int numBytes)
 Generates the number of random bytes specified by the size parameter and write them to the passed bytes array.
virtual unsigned char * providerGenerateSeed (int numBytes)
 Generates a new set of seed bytes, the returned value may be used to seed another Random Number Generator.
 SecureRandomImpl ()
virtual ~SecureRandomImpl ()
virtual void providerSetSeed (const unsigned char *seed, int size)
 Reseed the Random Number Generator, the value given supplements the previous seed value if any instead of replacing it.
virtual void providerNextBytes (unsigned char *bytes, int numBytes)
 Generates the number of random bytes specified by the size parameter and write them to the passed bytes array.
virtual unsigned char * providerGenerateSeed (int numBytes)
 Generates a new set of seed bytes, the returned value may be used to seed another Random Number Generator.

Detailed Description

Secure Random Number Generator for Unix based platforms that attempts to obtain secure bytes with high entropy from known sources.

Secure Random Number Generator for Windows based platforms that attempts to obtain secure bytes with high entropy from known sources.

If the platform does not have a source of secure bytes then the platform random number generator is used if one exists otherwise the Decaf RNG is used as a last resort.

Since:
1.0

Constructor & Destructor Documentation

decaf::internal::security::SecureRandomImpl::SecureRandomImpl (  ) 
virtual decaf::internal::security::SecureRandomImpl::~SecureRandomImpl (  )  [virtual]
decaf::internal::security::SecureRandomImpl::SecureRandomImpl (  ) 
virtual decaf::internal::security::SecureRandomImpl::~SecureRandomImpl (  )  [virtual]

Member Function Documentation

virtual unsigned char* decaf::internal::security::SecureRandomImpl::providerGenerateSeed ( int  numBytes  )  [virtual]

Generates a new set of seed bytes, the returned value may be used to seed another Random Number Generator.

The caller owns the returned array and must delete it.

Parameters:
numBytes The number of bytes that should be generated for the new seed array.

Implements decaf::security::SecureRandomSpi.

virtual unsigned char* decaf::internal::security::SecureRandomImpl::providerGenerateSeed ( int  numBytes  )  [virtual]

Generates a new set of seed bytes, the returned value may be used to seed another Random Number Generator.

The caller owns the returned array and must delete it.

Parameters:
numBytes The number of bytes that should be generated for the new seed array.

Implements decaf::security::SecureRandomSpi.

virtual void decaf::internal::security::SecureRandomImpl::providerNextBytes ( unsigned char *  bytes,
int  numBytes 
) [virtual]

Generates the number of random bytes specified by the size parameter and write them to the passed bytes array.

The array must have already been allocated and be of the correct size to prevent segmentation faults.

Parameters:
bytes The array that will be filled with random bytes equal to size.
numBytes The number of bytes to generate and write into the bytes array.

Implements decaf::security::SecureRandomSpi.

virtual void decaf::internal::security::SecureRandomImpl::providerNextBytes ( unsigned char *  bytes,
int  numBytes 
) [virtual]

Generates the number of random bytes specified by the size parameter and write them to the passed bytes array.

The array must have already been allocated and be of the correct size to prevent segmentation faults.

Parameters:
bytes The array that will be filled with random bytes equal to size.
numBytes The number of bytes to generate and write into the bytes array.

Implements decaf::security::SecureRandomSpi.

virtual void decaf::internal::security::SecureRandomImpl::providerSetSeed ( const unsigned char *  seed,
int  size 
) [virtual]

Reseed the Random Number Generator, the value given supplements the previous seed value if any instead of replacing it.

Parameters:
seed The array of bytes used to update the generators seed.
size The size of the passed byte array.

Implements decaf::security::SecureRandomSpi.

virtual void decaf::internal::security::SecureRandomImpl::providerSetSeed ( const unsigned char *  seed,
int  size 
) [virtual]

Reseed the Random Number Generator, the value given supplements the previous seed value if any instead of replacing it.

Parameters:
seed The array of bytes used to update the generators seed.
size The size of the passed byte array.

Implements decaf::security::SecureRandomSpi.


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

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1