31#include <esp_random.h>
45[[nodiscard]]
inline uint32_t
random() noexcept {
55 esp_fill_random(buf.data(), buf.size());
64 esp_fill_random(buf.data(), buf.size());
90 static constexpr result_type min() noexcept {
return std::numeric_limits<result_type>::min(); }
97 static constexpr result_type max() noexcept {
return std::numeric_limits<result_type>::max(); }
Hardware random number generator satisfying UniformRandomBitGenerator.
static constexpr result_type min() noexcept
Returns the minimum value that can be generated.
uint32_t result_type
The type of random values produced.
static constexpr result_type max() noexcept
Returns the maximum value that can be generated.
result_type operator()() noexcept
Generates a random value.
void fill_random(std::span< uint8_t > buf) noexcept
Fills a buffer with hardware-generated random bytes.
uint32_t random() noexcept
Returns a hardware-generated random 32-bit value.