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.
|
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 |
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
-
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 |
The documentation for this class was generated from the following file: