2018-08-12 18:07:22 +00:00
|
|
|
#ifndef INSECURERANDOMDATAPROVIDER_HH
|
|
|
|
#define INSECURERANDOMDATAPROVIDER_HH
|
2013-11-30 17:02:56 +00:00
|
|
|
|
|
|
|
#include <qpdf/RandomDataProvider.hh>
|
|
|
|
|
|
|
|
class InsecureRandomDataProvider: public RandomDataProvider
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
InsecureRandomDataProvider();
|
2023-05-20 13:25:46 +00:00
|
|
|
~InsecureRandomDataProvider() override = default;
|
|
|
|
void provideRandomData(unsigned char* data, size_t len) override;
|
2013-11-30 17:02:56 +00:00
|
|
|
static RandomDataProvider* getInstance();
|
|
|
|
|
|
|
|
private:
|
|
|
|
long random();
|
|
|
|
|
|
|
|
bool seeded_random;
|
|
|
|
};
|
|
|
|
|
2018-08-12 18:07:22 +00:00
|
|
|
#endif // INSECURERANDOMDATAPROVIDER_HH
|