diff options
Diffstat (limited to 'modules/es_ftw/es_ftw.h')
-rw-r--r-- | modules/es_ftw/es_ftw.h | 31 |
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 |