From b7563677f13adb8dfa5813ef91ed79364b2d984d Mon Sep 17 00:00:00 2001 From: lloyd Date: Sat, 24 May 2008 18:25:00 +0000 Subject: Previously random_integer and friends used the global PRNG object to get random bits. Now they take a reference to a RandomNumberGenerator object. This was applied several times out, so now the constructors to private key objects also take a RandomNumberGenerator& argument. This is also true for a number of randomized algorithms (Miller-Rabin, for instance). You can get a reference to the global PRNG with global_state().prng_reference() This is a provisional thing: and warning: it is not thread safe! If this is a problem instead keep per-thread PRNGs and pass them were needed. --- include/dh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/dh.h') diff --git a/include/dh.h b/include/dh.h index c2ee8bd7d..3c55ef8d4 100644 --- a/include/dh.h +++ b/include/dh.h @@ -45,7 +45,7 @@ class BOTAN_DLL DH_PrivateKey : public DH_PublicKey, MemoryVector public_value() const; DH_PrivateKey() {} - DH_PrivateKey(const DL_Group&); + DH_PrivateKey(const DL_Group&, RandomNumberGenerator&); DH_PrivateKey(const DL_Group&, const BigInt&, const BigInt& = 0); private: void PKCS8_load_hook(bool = false); -- cgit v1.2.3