aboutsummaryrefslogtreecommitdiffstats
path: root/modules/es_ftw/es_ftw.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-05-18 18:33:19 +0000
committerlloyd <[email protected]>2006-05-18 18:33:19 +0000
commita2c99d3270eb73ef2db5704fc54356c6b75096f8 (patch)
treead3d6c4fcc8dd0f403f8105598943616246fe172 /modules/es_ftw/es_ftw.h
Initial checkin1.5.6
Diffstat (limited to 'modules/es_ftw/es_ftw.h')
-rw-r--r--modules/es_ftw/es_ftw.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/es_ftw/es_ftw.h b/modules/es_ftw/es_ftw.h
new file mode 100644
index 000000000..7b450798b
--- /dev/null
+++ b/modules/es_ftw/es_ftw.h
@@ -0,0 +1,31 @@
+/*************************************************
+* File Tree Walking EntropySource Header File *
+* (C) 1999-2006 The Botan Project *
+*************************************************/
+
+#ifndef BOTAN_EXT_ENTROPY_SRC_FTW_H__
+#define BOTAN_EXT_ENTROPY_SRC_FTW_H__
+
+#include <botan/buf_es.h>
+
+namespace Botan {
+
+/*************************************************
+* File Tree Walking Entropy Source *
+*************************************************/
+class FTW_EntropySource : public Buffered_EntropySource
+ {
+ public:
+ FTW_EntropySource(const std::string& = "/proc");
+ private:
+ void do_fast_poll();
+ void do_slow_poll();
+ void gather_from_dir(const std::string&);
+ void gather_from_file(const std::string&);
+ const std::string path;
+ u32bit files_read, max_read;
+ };
+
+}
+
+#endif