activemq-cpp-3.4.0
|
Interface class used by Security Service Providers to implement a source of secure random bytes. More...
#include <src/main/decaf/security/SecureRandomSpi.h>
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. |
Interface class used by Security Service Providers to implement a source of secure random bytes.
decaf::security::SecureRandomSpi::SecureRandomSpi | ( | ) |
virtual decaf::security::SecureRandomSpi::~SecureRandomSpi | ( | ) | [virtual] |
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.
numBytes | The 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.
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. |
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.
seed | The array of bytes used to update the generators seed. |
size | The size of the passed byte array. |
Implemented in decaf::internal::security::SecureRandomImpl, and decaf::internal::security::SecureRandomImpl.