aboutsummaryrefslogtreecommitdiffstats
path: root/src/big_rand.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-07 14:08:27 +0000
committerlloyd <[email protected]>2008-04-07 14:08:27 +0000
commit9ec64ce60cad6c825b7cf40306a359d019e2c13c (patch)
treeb6bbaab35eb09bf7148541baef89701ccefcfcce /src/big_rand.cpp
parentab95931a8161005c8fd8aecc6f2f59d182b86de8 (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 'src/big_rand.cpp')
-rw-r--r--src/big_rand.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/big_rand.cpp b/src/big_rand.cpp
index 7dac05e67..4d3abe1a2 100644
--- a/src/big_rand.cpp
+++ b/src/big_rand.cpp
@@ -6,7 +6,7 @@
#include <botan/bigint.h>
#include <botan/parsing.h>
#include <botan/numthry.h>
-#include <botan/rng.h>
+#include <botan/libstate.h>
namespace Botan {
@@ -36,7 +36,7 @@ void BigInt::randomize(u32bit bitsize)
else
{
SecureVector<byte> array((bitsize + 7) / 8);
- Global_RNG::randomize(array, array.size());
+ global_state().randomize(array, array.size());
if(bitsize % 8)
array[0] &= 0xFF >> (8 - (bitsize % 8));
array[0] |= 0x80 >> ((bitsize % 8) ? (8 - bitsize % 8) : 0);