aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2012-12-28 22:37:46 +0100
committerJay Berkenbilt <ejb@ql.org>2012-12-31 16:32:32 +0100
commit4eccb9d87b793ad2b6e1532ef4c89ab9d2bb3a90 (patch)
treea6b1bb9319ac1363a76da0a2b86453688bb149aa /include
parent16a23368e738be88669f4fbf4d3341dd473519c7 (diff)
downloadqpdf-4eccb9d87b793ad2b6e1532ef4c89ab9d2bb3a90.tar.zst
Add random number functions to QUtil
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QUtil.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh
index cdeefd71..8baedab6 100644
--- a/include/qpdf/QUtil.hh
+++ b/include/qpdf/QUtil.hh
@@ -83,6 +83,18 @@ namespace QUtil
// encoding for the unicode value passed in.
QPDF_DLL
std::string toUTF8(unsigned long uval);
+
+ // Wrapper around random from stdlib. Calls srandom automatically
+ // the first time it is called.
+ QPDF_DLL
+ long random();
+
+ // Wrapper around srandom from stdlib.
+ QPDF_DLL
+ void srandom(unsigned int seed);
+
+ QPDF_DLL
+ void initializeWithRandomBytes(unsigned char* data, size_t len);
};
#endif // __QUTIL_HH__