aboutsummaryrefslogtreecommitdiffstats
path: root/src/entropy/entropy_src.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-10-26 20:55:57 +0000
committerlloyd <[email protected]>2008-10-26 20:55:57 +0000
commitac4bab4e40a45a7d1b6061142ab831813bf0d6ca (patch)
treecbaad5829ae4a65689a4b5cbfa4ed4dfcbcdbcc3 /src/entropy/entropy_src.h
parenta78b39c6bd171c8851aa53debe8ebc1665104d9b (diff)
Move EntropySource base class to new entropy_src.h (which allows the implementations
to decouple from knowing about RandomNumberGenerator).
Diffstat (limited to 'src/entropy/entropy_src.h')
-rw-r--r--src/entropy/entropy_src.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/entropy/entropy_src.h b/src/entropy/entropy_src.h
new file mode 100644
index 000000000..4ee24ce4a
--- /dev/null
+++ b/src/entropy/entropy_src.h
@@ -0,0 +1,26 @@
+/*************************************************
+* EntropySource Header File *
+* (C) 2008 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_ENTROPY_SOURCE_BASE_H__
+#define BOTAN_ENTROPY_SOURCE_BASE_H__
+
+#include <botan/types.h>
+
+namespace Botan {
+
+/**
+* Abstract interface to a source of (hopefully unpredictable) system entropy
+*/
+class BOTAN_DLL EntropySource
+ {
+ public:
+ virtual u32bit slow_poll(byte buf[], u32bit len) = 0;
+ virtual u32bit fast_poll(byte buf[], u32bit len) = 0;
+ virtual ~EntropySource() {}
+ };
+
+}
+
+#endif