aboutsummaryrefslogtreecommitdiffstats
path: root/modules/es_unix/es_unix.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/es_unix/es_unix.h')
-rw-r--r--modules/es_unix/es_unix.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/modules/es_unix/es_unix.h b/modules/es_unix/es_unix.h
new file mode 100644
index 000000000..74f960eb8
--- /dev/null
+++ b/modules/es_unix/es_unix.h
@@ -0,0 +1,35 @@
+/*************************************************
+* Unix EntropySource Header File *
+* (C) 1999-2006 The Botan Project *
+*************************************************/
+
+#ifndef BOTAN_EXT_ENTROPY_SRC_UNIX_H__
+#define BOTAN_EXT_ENTROPY_SRC_UNIX_H__
+
+#include <botan/buf_es.h>
+#include <botan/unix_cmd.h>
+#include <vector>
+
+namespace Botan {
+
+/*************************************************
+* Unix Entropy Source *
+*************************************************/
+class Unix_EntropySource : public Buffered_EntropySource
+ {
+ public:
+ void add_sources(const Unix_Program[], u32bit);
+ Unix_EntropySource();
+ private:
+ void do_fast_poll();
+ void do_slow_poll();
+ void gather(u32bit);
+ u32bit gather_from(const Unix_Program&);
+ static void add_default_sources(std::vector<Unix_Program>&);
+
+ std::vector<Unix_Program> sources;
+ };
+
+}
+
+#endif