This repository has been archived on 2022-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
fortuna/entropy_src.h
surtur baaf4f6db0
All checks were successful
continuous-integration/drone/push Build is passing
fix: -Wnon-virtual-dtor
2022-02-03 01:11:39 +01:00

31 lines
615 B
C++

#ifndef FORTUNA_ENTROPY_SRC_H
#define FORTUNA_ENTROPY_SRC_H
#include "event_adder_impl.h"
#include <memory>
namespace fortuna {
namespace accumulator {
class EntropySrc {
private:
std::unique_ptr<EventAdderImpl> ea_impl;
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;
protected:
virtual ~EntropySrc() noexcept = default;
};
} // namespace accumulator
} // namespace fortuna
#endif // FORTUNA_ENTROPY_SRC_H