summaryrefslogtreecommitdiffstats
path: root/include/qpdf/RandomDataProvider.hh
diff options
context:
space:
mode:
Diffstat (limited to 'include/qpdf/RandomDataProvider.hh')
-rw-r--r--include/qpdf/RandomDataProvider.hh32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/qpdf/RandomDataProvider.hh b/include/qpdf/RandomDataProvider.hh
new file mode 100644
index 00000000..68c9cb6e
--- /dev/null
+++ b/include/qpdf/RandomDataProvider.hh
@@ -0,0 +1,32 @@
+/* Copyright (c) 2005-2013 Jay Berkenbilt
+ *
+ * This file is part of qpdf. This software may be distributed under
+ * the terms of version 2 of the Artistic License which may be found
+ * in the source distribution. It is provided "as is" without express
+ * or implied warranty.
+ */
+
+#ifndef __RANDOMDATAPROVIDER_HH__
+#define __RANDOMDATAPROVIDER_HH__
+
+#include <string.h> // for size_t
+
+class RandomDataProvider
+{
+ public:
+ virtual ~RandomDataProvider()
+ {
+ }
+ virtual void provideRandomData(unsigned char* data, size_t len) = 0;
+
+ protected:
+ RandomDataProvider()
+ {
+ }
+
+ private:
+ RandomDataProvider(RandomDataProvider const&);
+ RandomDataProvider& operator=(RandomDataProvider const&);
+};
+
+#endif // __RANDOMDATAPROVIDER_HH__