7#ifndef BOTAN_STATEFUL_RNG_H_
8#define BOTAN_STATEFUL_RNG_H_
10#include <botan/mutex.h>
97 bool is_seeded() const final;
165 virtual
void generate_output(std::span<uint8_t> output, std::span<const uint8_t> input) = 0;
171 virtual
void update(std::span<const uint8_t> input) = 0;
179 void generate_batched_output(std::span<uint8_t> output, std::span<const uint8_t> input);
181 void fill_bytes_with_input(std::span<uint8_t> output, std::span<const uint8_t> input) final;
183 void accept_seed_material(std::span<const uint8_t> input) final;
185 size_t finish_reseed(
size_t bits_collected);
187 void reset_reseed_counter();
189 bool fork_detected() const;
199 const
size_t m_reseed_interval;
202 std::unique_ptr<
OS::Fork_Detector> m_fork_detector;
209 size_t m_reseed_counter = 0;
#define BOTAN_PUBLIC_API(maj, min)
RandomNumberGenerator()=default
static constexpr size_t DefaultPollBits
Stateful_RNG & operator=(const Stateful_RNG &other)=delete
size_t reseed_interval() const
Stateful_RNG(Stateful_RNG &&other)=delete
Stateful_RNG(const Stateful_RNG &other)=delete
virtual size_t security_level() const =0
virtual void clear_state()=0
Stateful_RNG(RandomNumberGenerator &rng, Entropy_Sources &entropy_sources, size_t reseed_interval)
void initialize_with(const uint8_t input[], size_t length)
virtual void generate_output(std::span< uint8_t > output, std::span< const uint8_t > input)=0
bool accepts_input() const final
virtual size_t max_number_of_bytes_per_request() const =0
virtual void update(std::span< const uint8_t > input)=0
void initialize_with(std::span< const uint8_t > input)
Stateful_RNG & operator=(Stateful_RNG &&other)=delete
noop_mutex recursive_mutex_type