diff options
author | lloyd <[email protected]> | 2008-04-07 14:08:27 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-04-07 14:08:27 +0000 |
commit | 9ec64ce60cad6c825b7cf40306a359d019e2c13c (patch) | |
tree | b6bbaab35eb09bf7148541baef89701ccefcfcce /include | |
parent | ab95931a8161005c8fd8aecc6f2f59d182b86de8 (diff) |
Remove the Global_RNG namespace, along with rng.h and rng.cpp. This was
essentially a facade for the RNG object living in the global library state.
Rewrite all callers to directly invoke the global state object: this makes
it more clear what functions are actually accessing mutable state outside of
the normal reference graph (and thus, which functions will have to be
altered in order to remove this dependency). Other facades remain in place
for the configuration object and the memory allocator factory.
Diffstat (limited to 'include')
-rw-r--r-- | include/botan.h | 1 | ||||
-rw-r--r-- | include/libstate.h | 1 | ||||
-rw-r--r-- | include/rng.h | 32 |
3 files changed, 1 insertions, 33 deletions
diff --git a/include/botan.h b/include/botan.h index 007bf411e..bdd591569 100644 --- a/include/botan.h +++ b/include/botan.h @@ -7,6 +7,5 @@ #include <botan/config.h> #include <botan/init.h> #include <botan/lookup.h> -#include <botan/rng.h> #include <botan/version.h> #include <botan/parsing.h> diff --git a/include/libstate.h b/include/libstate.h index 0b2a2959f..5534d4ac1 100644 --- a/include/libstate.h +++ b/include/libstate.h @@ -48,6 +48,7 @@ class Library_State bool rng_is_seeded() const { return rng->is_seeded(); } void randomize(byte[], u32bit); + byte random(); void set_prng(RandomNumberGenerator*); void add_entropy_source(EntropySource*, bool = true); diff --git a/include/rng.h b/include/rng.h deleted file mode 100644 index 207da51b5..000000000 --- a/include/rng.h +++ /dev/null @@ -1,32 +0,0 @@ -/************************************************* -* Global RNG Header File * -* (C) 1999-2007 The Botan Project * -*************************************************/ - -#ifndef BOTAN_GLOBAL_RNG_H__ -#define BOTAN_GLOBAL_RNG_H__ - -#include <botan/base.h> - -namespace Botan { - -/************************************************* -* RNG Access and Seeding Functions * -*************************************************/ -namespace Global_RNG { - -void randomize(byte[], u32bit); -byte random(); - -void add_entropy(const byte[], u32bit); -void add_entropy(EntropySource&, bool = true); - -u32bit seed(bool = true, u32bit = 256); - -void add_es(EntropySource*, bool = true); - -} - -} - -#endif |