/*! * \brief Helper to get a Randomizer. * * \copyright Copyright (c) 2015-2018 Governikus GmbH & Co. KG, Germany */ #pragma once #include #include namespace governikus { class Randomizer { private: std::mt19937 mGenerator; bool mSecureRandom; template static QList getEntropy(); template static QList getEntropyWin(); template static QList getEntropyUnixoid(); template static QList getEntropyApple(); Randomizer(const Randomizer&) = delete; Randomizer& operator=(const Randomizer&) = delete; protected: Randomizer(); ~Randomizer(); public: static Randomizer& getInstance(); std::mt19937& getGenerator(); bool isSecureRandom() const; }; } /* namespace governikus */