9#include <botan/entropy_src.h>
10#include <botan/internal/loadstor.h>
11#include <botan/internal/os_utils.h>
13#if defined(BOTAN_HAS_SYSTEM_RNG)
14 #include <botan/system_rng.h>
27 std::array<uint8_t, s_hd_clk + s_sys_ts + s_pid> additional_input = {0};
28 auto s_additional_input = std::span(additional_input.begin(), additional_input.end());
31 s_additional_input = s_additional_input.subspan(s_hd_clk);
33#if defined(BOTAN_HAS_SYSTEM_RNG)
38 s_additional_input = s_additional_input.subspan(s_sys_ts);
51 return srcs.
poll(*
this, poll_bits, poll_timeout);
63void Null_RNG::fill_bytes_with_input(std::span<uint8_t> output, std::span<const uint8_t> ) {
size_t poll(RandomNumberGenerator &rng, size_t bits, std::chrono::milliseconds timeout)
void randomize(std::span< uint8_t > output)
virtual bool accepts_input() const =0
void add_entropy(std::span< const uint8_t > input)
virtual void reseed_from_rng(RandomNumberGenerator &rng, size_t poll_bits=BOTAN_RNG_RESEED_POLL_BITS)
void randomize_with_ts_input(std::span< uint8_t > output)
void random_vec(std::span< uint8_t > v)
virtual void fill_bytes_with_input(std::span< uint8_t > output, std::span< const uint8_t > input)=0
virtual size_t reseed(Entropy_Sources &srcs, size_t poll_bits=BOTAN_RNG_RESEED_POLL_BITS, std::chrono::milliseconds poll_timeout=BOTAN_RNG_RESEED_DEFAULT_TIMEOUT)
uint64_t BOTAN_TEST_API get_high_resolution_clock()
uint64_t BOTAN_TEST_API get_system_timestamp_ns()
uint32_t BOTAN_TEST_API get_process_id()
RandomNumberGenerator & system_rng()
constexpr auto store_le(ParamTs &&... params)