Loading...
Searching...
No Matches
lime::bctbx_RNG Class Reference

A wrapper around the bctoolbox Random Number Generator, implements the RNG interface. More...

Inheritance diagram for lime::bctbx_RNG:

## Public Member Functions

void | randomize (sBuffer< lime::settings::DRrandomSeedSize > &buffer) override
| fill the given RandomSeed buffer with Random bytes
uint32_t | randomize () override
| 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.
void | randomize (uint8_t *buffer, const size_t size) override
Public Member Functions inherited from lime::RNG
virtual | ~RNG ()=default

## Detailed Description

A wrapper around the bctoolbox Random Number Generator, implements the RNG interface.

## Member Function Documentation

## randomize() [1/3]

uint32_t lime::bctbx_RNG::randomize | ( |  | ) |

inline override 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.

Returns
  a random 32 bits unsigned integer

Implements lime::RNG.

## randomize() [2/3]

void lime::bctbx_RNG::randomize | ( | sBuffer< lime::settings::DRrandomSeedSize > & | buffer | ) |

inline override virtual

fill the given RandomSeed buffer with Random bytes

Parameters

  [in,out] | buffer | point to the beginning of the buffer to be filled with random bytes

Implements lime::RNG.

## randomize() [3/3]

void lime::bctbx_RNG::randomize | ( | uint8_t * | buffer,
|  | const size_t | size )

inline override virtual

fill a buffer with random numbers

Parameters

  [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

Implements lime::RNG.

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

- /build/lime-9DdzML/lime-5.3.105+dfsg/src/lime_crypto_primitives.cpp