2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-16 01:27:07 +00:00
qpdf/libqpdf/CryptoRandomDataProvider.cc

26 lines
511 B
C++
Raw Normal View History

#include <qpdf/CryptoRandomDataProvider.hh>
#include <qpdf/QPDFCryptoProvider.hh>
CryptoRandomDataProvider::CryptoRandomDataProvider()
{
}
CryptoRandomDataProvider::~CryptoRandomDataProvider()
{
}
void
CryptoRandomDataProvider::provideRandomData(unsigned char* data, size_t len)
{
auto crypto = QPDFCryptoProvider::getImpl();
crypto->provideRandomData(data, len);
}
RandomDataProvider*
CryptoRandomDataProvider::getInstance()
{
static CryptoRandomDataProvider instance;
return &instance;
}