From b8768fa4372eaeb0b816db7bc55813261bc35c2a Mon Sep 17 00:00:00 2001 From: lloyd Date: Sat, 24 May 2008 17:05:16 +0000 Subject: Remove both default arguments to the constructor of ANSI_X931_RNG. If the second argument was NULL, it would default to a new Randpool. But this introduces an annoying dependency: really it is the caller who is relying on Randpool. Make this explicit by passing a new Randpool pointer to the constructor in Library_State. This will break all callers using ANSI_X931_RNG's constructors with default arguments. To regain the previous behavior, change: ANSI_X931_RNG rng; ANSI_X931_RNG rng("/*cipher name*/"); to ANSI_X931_RNG rng(/*cipher name, default was AES-256 */, new Randpool); You are free to pass another PRNG object if you like. This make require inclusion of --- include/x931_rng.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/x931_rng.h b/include/x931_rng.h index 3cfa52b6a..8bb8cc2ac 100644 --- a/include/x931_rng.h +++ b/include/x931_rng.h @@ -21,7 +21,7 @@ class BOTAN_DLL ANSI_X931_RNG : public RandomNumberGenerator void clear() throw(); std::string name() const; - ANSI_X931_RNG(const std::string& = "", RandomNumberGenerator* = 0); + ANSI_X931_RNG(const std::string&, RandomNumberGenerator*); ~ANSI_X931_RNG(); private: void add_randomness(const byte[], u32bit); -- cgit v1.2.3