2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-10-31 19:02:30 +00:00
qpdf/libqpdf/qpdf/InsecureRandomDataProvider.hh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
492 B
C++
Raw Normal View History

#ifndef INSECURERANDOMDATAPROVIDER_HH
#define INSECURERANDOMDATAPROVIDER_HH
#include <qpdf/RandomDataProvider.hh>
class InsecureRandomDataProvider: public RandomDataProvider
{
public:
InsecureRandomDataProvider();
~InsecureRandomDataProvider() override = default;
void provideRandomData(unsigned char* data, size_t len) override;
static RandomDataProvider* getInstance();
private:
long random();
bool seeded_random;
};
#endif // INSECURERANDOMDATAPROVIDER_HH