lime
Lime is a C++ library implementing Open Whisper System Signal protocol
|
Random number generator interface. More...
Public Member Functions | |
virtual void | randomize (sBuffer< lime::settings::DRrandomSeedSize > &buffer)=0 |
fill the given RandomSeed buffer with Random bytes More... | |
virtual uint32_t | randomize ()=0 |
Generate a 32 bits unsigned integer(used to generate keys Id) The MSbit is forced to 0 to avoid dealing with DB misinterpreting unsigned values into signed one Our random number is actually on 31 bits. More... | |
virtual void | randomize (uint8_t *buffer, const size_t size)=0 |
virtual | ~RNG ()=default |
Random number generator interface.
This abstract class is used to hold a RNG object It provides explicit functions to generate:
|
virtualdefault |
|
pure virtual |
fill the given RandomSeed buffer with Random bytes
[in,out] | buffer | point to the beginning of the buffer to be filled with random bytes |
Implemented in lime::bctbx_RNG.
|
pure virtual |
Generate a 32 bits unsigned integer(used to generate keys Id) The MSbit is forced to 0 to avoid dealing with DB misinterpreting unsigned values into signed one Our random number is actually on 31 bits.
Implemented in lime::bctbx_RNG.
|
pure virtual |
fill a buffer with random numbers
[in,out] | buffer | The buffer to be filled with random (callers responsability to allocate memory) |
[in] | size | size in bytes of the random generated, buffer must be at least of this size |
Implemented in lime::bctbx_RNG.