diff options
-rw-r--r-- | checks/rng.cpp | 2 | ||||
-rw-r--r-- | include/rng.h | 7 | ||||
-rw-r--r-- | src/rng.cpp | 2 |
3 files changed, 4 insertions, 7 deletions
diff --git a/checks/rng.cpp b/checks/rng.cpp index 05cd4da8e..a2e53ba63 100644 --- a/checks/rng.cpp +++ b/checks/rng.cpp @@ -8,7 +8,7 @@ RandomNumberGenerator& global_rng() static RandomNumberGenerator* rng = 0; if(!rng) - rng = make_rng(); + rng = RandomNumberGenerator::make_rng(); return *rng; } diff --git a/include/rng.h b/include/rng.h index fc75237cc..78edc1554 100644 --- a/include/rng.h +++ b/include/rng.h @@ -27,6 +27,8 @@ class BOTAN_DLL EntropySource class BOTAN_DLL RandomNumberGenerator { public: + static RandomNumberGenerator* make_rng(); + virtual void randomize(byte[], u32bit) = 0; virtual bool is_seeded() const = 0; virtual void clear() throw() {}; @@ -38,11 +40,6 @@ class BOTAN_DLL RandomNumberGenerator virtual ~RandomNumberGenerator() {} }; -/************************************************* -* Create and seed an RNG * -*************************************************/ -RandomNumberGenerator* make_rng(); - } #endif diff --git a/src/rng.cpp b/src/rng.cpp index 5b1bf6915..67205c3b2 100644 --- a/src/rng.cpp +++ b/src/rng.cpp @@ -70,7 +70,7 @@ byte RandomNumberGenerator::next_byte() /************************************************* * Create and seed a new RNG object * *************************************************/ -RandomNumberGenerator* make_rng() +RandomNumberGenerator* RandomNumberGenerator::make_rng() { Randpool* randpool = new Randpool("AES-256", "HMAC(SHA-256)"); |