aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/CryptoRandomDataProvider.cc
blob: 6792c79b3c28231125f8858bc2fee14a36af8d8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#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;
}