diff options
author | lloyd <[email protected]> | 2008-09-28 23:04:35 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-28 23:04:35 +0000 |
commit | 8820c122b9cd665621729abfcf8c6751762535df (patch) | |
tree | 26f775d42720c60adf13127da17d715d51187765 /src | |
parent | 7b04ba8df59963f9907bcd5fd6eb3dcfc81513cf (diff) |
Move buf_es into module, add deps where needed
Diffstat (limited to 'src')
-rw-r--r-- | src/entropy/beos_stats/modinfo.txt | 4 | ||||
-rw-r--r-- | src/entropy/buf_es/buf_es.cpp (renamed from src/buf_es.cpp) | 0 | ||||
-rw-r--r-- | src/entropy/buf_es/buf_es.h | 39 | ||||
-rw-r--r-- | src/entropy/proc_walk/modinfo.txt | 4 | ||||
-rw-r--r-- | src/entropy/unix_procs/modinfo.txt | 4 | ||||
-rw-r--r-- | src/entropy/win32_stats/modinfo.txt | 4 |
6 files changed, 55 insertions, 0 deletions
diff --git a/src/entropy/beos_stats/modinfo.txt b/src/entropy/beos_stats/modinfo.txt index a7e62cfb3..33badd5c3 100644 --- a/src/entropy/beos_stats/modinfo.txt +++ b/src/entropy/beos_stats/modinfo.txt @@ -17,3 +17,7 @@ beos <libs> beos -> root,be </libs> + +<requires> +buf_es +</requires> diff --git a/src/buf_es.cpp b/src/entropy/buf_es/buf_es.cpp index 19f30e22c..19f30e22c 100644 --- a/src/buf_es.cpp +++ b/src/entropy/buf_es/buf_es.cpp diff --git a/src/entropy/buf_es/buf_es.h b/src/entropy/buf_es/buf_es.h new file mode 100644 index 000000000..5748613da --- /dev/null +++ b/src/entropy/buf_es/buf_es.h @@ -0,0 +1,39 @@ +/************************************************* +* Buffered EntropySource Header File * +* (C) 1999-2007 Jack Lloyd * +*************************************************/ + +#ifndef BOTAN_BUFFERED_ES_H__ +#define BOTAN_BUFFERED_ES_H__ + +#include <botan/rng.h> +#include <botan/secmem.h> + +namespace Botan { + +/************************************************* +* Buffered EntropySource * +*************************************************/ +class BOTAN_DLL Buffered_EntropySource : public EntropySource + { + public: + u32bit slow_poll(byte[], u32bit); + u32bit fast_poll(byte[], u32bit); + protected: + Buffered_EntropySource(); + u32bit copy_out(byte[], u32bit, u32bit); + + void add_bytes(const void*, u32bit); + void add_bytes(u64bit); + + virtual void do_slow_poll() = 0; + virtual void do_fast_poll(); + private: + SecureVector<byte> buffer; + u32bit write_pos, read_pos; + bool done_slow_poll; + }; + +} + +#endif diff --git a/src/entropy/proc_walk/modinfo.txt b/src/entropy/proc_walk/modinfo.txt index d932523fd..ad945ee46 100644 --- a/src/entropy/proc_walk/modinfo.txt +++ b/src/entropy/proc_walk/modinfo.txt @@ -10,6 +10,10 @@ es_ftw.h es_ftw.cpp </add> +<requires> +buf_es +</requires> + <os> aix cygwin diff --git a/src/entropy/unix_procs/modinfo.txt b/src/entropy/unix_procs/modinfo.txt index f16e21289..981399dbb 100644 --- a/src/entropy/unix_procs/modinfo.txt +++ b/src/entropy/unix_procs/modinfo.txt @@ -13,6 +13,10 @@ es_unix.h unix_cmd.h </add> +<requires> +buf_es +</requires> + <os> aix beos diff --git a/src/entropy/win32_stats/modinfo.txt b/src/entropy/win32_stats/modinfo.txt index 931760979..6be850561 100644 --- a/src/entropy/win32_stats/modinfo.txt +++ b/src/entropy/win32_stats/modinfo.txt @@ -13,6 +13,10 @@ es_win32.h es_win32.cpp </add> +<requires> +buf_es +</requires> + <os> windows cygwin |