diff options
author | lloyd <[email protected]> | 2008-06-27 17:00:56 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-06-27 17:00:56 +0000 |
commit | 89382c8d6e8861e702def6a6e695fc2b783e7f09 (patch) | |
tree | e479233393d84ee88c5ae2f08889f7117e8da911 /checks/validate.cpp | |
parent | 09d2b6df9a2a680476160a6a0a56c4b4f2fb91aa (diff) |
Remove uses of global PRNG from self-test and benchmark code. Assumes
access to /dev/random (will be cleaned up shortly)
Diffstat (limited to 'checks/validate.cpp')
-rw-r--r-- | checks/validate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/checks/validate.cpp b/checks/validate.cpp index 2910f0b37..1871abedd 100644 --- a/checks/validate.cpp +++ b/checks/validate.cpp @@ -10,10 +10,10 @@ #include <botan/filters.h> #include <botan/exceptn.h> -#include <botan/libstate.h> using namespace Botan; #include "validate.h" +#include "common.h" #define EXTRA_TESTS 0 #define DEBUG 0 @@ -35,7 +35,7 @@ u32bit random_word(u32bit max) /* normal version */ u32bit r = 0; for(u32bit j = 0; j != 4; j++) - r = (r << 8) | Botan::global_state().random(); + r = (r << 8) | global_rng().next_byte(); return ((r % max) + 1); // return between 1 and max inclusive #endif } |