activemq-cpp-3.6.0
decaf::security::SecureRandomSpi Class Reference

Interface class used by Security Service Providers to implement a source of secure random bytes. More...

#include <src/main/decaf/security/SecureRandomSpi.h>

Inheritance diagram for decaf::security::SecureRandomSpi:

Public Member Functions

 SecureRandomSpi ()
virtual ~SecureRandomSpi ()
virtual void providerSetSeed (const unsigned char *seed, int size)=0
 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)=0
 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)=0
 Generates a new set of seed bytes, the returned value may be used to seed another Random Number Generator.

Detailed Description

Interface class used by Security Service Providers to implement a source of secure random bytes.

Since
1.0

Constructor & Destructor Documentation

decaf::security::SecureRandomSpi::SecureRandomSpi ( )
virtual decaf::security::SecureRandomSpi::~SecureRandomSpi ( )
virtual

Member Function Documentation

virtual unsigned char* decaf::security::SecureRandomSpi::providerGenerateSeed ( int  numBytes)
pure 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
numBytesThe number of bytes that should be generated for the new seed array.

Implemented in decaf::internal::security::SecureRandomImpl, and decaf::internal::security::SecureRandomImpl.

virtual void decaf::security::SecureRandomSpi::providerNextBytes ( unsigned char *  bytes,
int  numBytes 
)
pure 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
bytesThe array that will be filled with random bytes equal to size.
numBytesThe number of bytes to generate and write into the bytes array.

Implemented in decaf::internal::security::SecureRandomImpl, and decaf::internal::security::SecureRandomImpl.

virtual void decaf::security::SecureRandomSpi::providerSetSeed ( const unsigned char *  seed,
int  size 
)
pure virtual

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

Parameters
seedThe array of bytes used to update the generators seed.
sizeThe size of the passed byte array.

Implemented in decaf::internal::security::SecureRandomImpl, and decaf::internal::security::SecureRandomImpl.


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