aboutsummaryrefslogtreecommitdiffstats
path: root/include/rng.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-06-27 18:30:07 +0000
committerlloyd <[email protected]>2008-06-27 18:30:07 +0000
commite2a465b75d8baeac912e3f4d428ebc5e03fd76f1 (patch)
tree7490308782cbac8b0ec9ca0cc23d73ec8a0a7b68 /include/rng.h
parentd84a769cc563aebeae3893f952cba1659562e430 (diff)
New structure for entropy sources + RNGs. The entropy sources are owned by
Randpool, it will query them as needed (or if asked to do so). New function make_rng() that creates an RNG (X9.31 backed by a Randpool) and seeds it. Remove the entropy source related code from the Modules/Builtin_Modules classes.
Diffstat (limited to 'include/rng.h')
-rw-r--r--include/rng.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/rng.h b/include/rng.h
index 3a3b66251..fc75237cc 100644
--- a/include/rng.h
+++ b/include/rng.h
@@ -33,14 +33,16 @@ class BOTAN_DLL RandomNumberGenerator
byte next_byte();
- void add_entropy(const byte[], u32bit);
- u32bit add_entropy(EntropySource&, bool = true);
+ virtual void reseed() {};
virtual ~RandomNumberGenerator() {}
- private:
- virtual void add_randomness(const byte[], u32bit) = 0;
};
+/*************************************************
+* Create and seed an RNG *
+*************************************************/
+RandomNumberGenerator* make_rng();
+
}
#endif