Coverage Report

Created: 2025-08-26 07:09

/src/qpdf/include/qpdf/RandomDataProvider.hh
Line
Count
Source (jump to first uncovered line)
1
// Copyright (c) 2005-2021 Jay Berkenbilt
2
// Copyright (c) 2022-2025 Jay Berkenbilt and Manfred Holger
3
//
4
// This file is part of qpdf.
5
//
6
// Licensed under the Apache License, Version 2.0 (the "License");
7
// you may not use this file except in compliance with the License.
8
// You may obtain a copy of the License at
9
//
10
//   http://www.apache.org/licenses/LICENSE-2.0
11
//
12
// Unless required by applicable law or agreed to in writing, software
13
// distributed under the License is distributed on an "AS IS" BASIS,
14
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
// See the License for the specific language governing permissions and
16
// limitations under the License.
17
//
18
// Versions of qpdf prior to version 7 were released under the terms
19
// of version 2.0 of the Artistic License. At your option, you may
20
// continue to consider qpdf to be licensed under those terms. Please
21
// see the manual for additional information.
22
23
#ifndef RANDOMDATAPROVIDER_HH
24
#define RANDOMDATAPROVIDER_HH
25
26
#include <qpdf/DLL.h>
27
#include <cstring> // for size_t
28
29
class QPDF_DLL_CLASS RandomDataProvider
30
{
31
  public:
32
0
    virtual ~RandomDataProvider() = default;
33
    virtual void provideRandomData(unsigned char* data, size_t len) = 0;
34
35
  protected:
36
    QPDF_DLL_PRIVATE
37
    RandomDataProvider() = default;
38
39
  private:
40
    RandomDataProvider(RandomDataProvider const&) = delete;
41
    RandomDataProvider& operator=(RandomDataProvider const&) = delete;
42
};
43
44
#endif // RANDOMDATAPROVIDER_HH