SPSP
Simple publish-subscribe protocol. Connects low power IoT clients to MQTT.
All Classes Files Functions Variables Typedefs Enumerations
Public Member Functions | List of all members
SPSP::Random Class Reference

ESP random generator. More...

#include <random.hpp>

Inheritance diagram for SPSP::Random:
Inheritance graph
[legend]
Collaboration diagram for SPSP::Random:
Collaboration graph
[legend]

Public Member Functions

void bytes (void *buf, size_t len) const noexcept
 Generates len truly random bytes in buf More...
 
void bytes (void *buf, size_t len) const
 Generates len truly random bytes in buf More...
 
void bytes (void *buf, size_t len) const noexcept
 Generates len truly random bytes in buf More...
 

Detailed Description

ESP random generator.

Testing random generator.

Truly random if WiFi or Bluetooth is enabled.

Definition at line 25 of file espidf/spsp/random.hpp.

Member Function Documentation

◆ bytes() [1/3]

void SPSP::Random::bytes ( void *  buf,
size_t  len 
) const
inlinevirtual

Generates len truly random bytes in buf

Parameters
bufBuffer
lenLength
Exceptions
RandomGeneratorErrorRandom generator error if generation fails.

Implements SPSP::IRandom.

Definition at line 34 of file linux/spsp/random.hpp.

◆ bytes() [2/3]

void SPSP::Random::bytes ( void *  buf,
size_t  len 
) const
inlinevirtualnoexcept

Generates len truly random bytes in buf

Platform dependent implementation, but should be cryptographically secure.

Parameters
bufBuffer
lenLength
Exceptions
RandomGeneratorErrorRandom generator error if generation fails.

Implements SPSP::IRandom.

Definition at line 26 of file testing/spsp/random.hpp.

◆ bytes() [3/3]

void SPSP::Random::bytes ( void *  buf,
size_t  len 
) const
inlinevirtualnoexcept

Generates len truly random bytes in buf

Platform dependent implementation, but should be cryptographically secure.

Parameters
bufBuffer
lenLength

Implements SPSP::IRandom.

Definition at line 37 of file espidf/spsp/random.hpp.


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