fortuna/entropy_src.h

31 lines
615 B
C
Raw Normal View History

#ifndef FORTUNA_ENTROPY_SRC_H
#define FORTUNA_ENTROPY_SRC_H
#include "event_adder_impl.h"
#include <memory>
namespace fortuna {
namespace accumulator {
class EntropySrc {
2022-01-10 04:25:03 +01:00
private:
std::unique_ptr<EventAdderImpl> ea_impl;
2022-01-10 04:25:03 +01:00
public:
virtual void event(accumulator::EventAdderImpl& adder) = 0;
static constexpr const std::size_t max_event_length{32};
EntropySrc() = default;
EntropySrc(const EntropySrc&) = delete;
EntropySrc& operator=(const EntropySrc&) = delete;
2022-02-03 01:11:39 +01:00
protected:
virtual ~EntropySrc() noexcept = default;
};
2022-01-10 04:25:03 +01:00
} // namespace accumulator
} // namespace fortuna
#endif // FORTUNA_ENTROPY_SRC_H