From 89382c8d6e8861e702def6a6e695fc2b783e7f09 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 27 Jun 2008 17:00:56 +0000 Subject: Remove uses of global PRNG from self-test and benchmark code. Assumes access to /dev/random (will be cleaned up shortly) --- checks/bigint.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'checks/bigint.cpp') diff --git a/checks/bigint.cpp b/checks/bigint.cpp index 84bee4eaa..518261580 100644 --- a/checks/bigint.cpp +++ b/checks/bigint.cpp @@ -7,7 +7,6 @@ #include #include #include -#include using namespace Botan; #include "common.h" @@ -269,7 +268,7 @@ u32bit check_mod(const std::vector& args) /* Won't work for us, just pick one at random */ while(b_word == 0) for(u32bit j = 0; j != 2*sizeof(word); j++) - b_word = (b_word << 4) ^ global_state().random(); + b_word = (b_word << 4) ^ global_rng().next_byte(); b = b_word; @@ -338,7 +337,7 @@ u32bit check_primetest(const std::vector& args) bool should_be_prime = (args[1] == "1"); bool is_prime = Botan::verify_prime(n, - global_state().prng_reference()); + global_rng()); if(is_prime != should_be_prime) { -- cgit v1.2.3