aboutsummaryrefslogtreecommitdiffstats
path: root/src/pbes1.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-05-24 19:49:14 +0000
committerlloyd <[email protected]>2008-05-24 19:49:14 +0000
commit8283202b8bfd5fe088f87a91a3158bef0072311f (patch)
treec7e7c773a9658e1d4cb7cd03d94ffa10f443ec9a /src/pbes1.cpp
parent440a5d6bd0de20027d8c094abdd1390ee23eae6f (diff)
Don't use the global PRNG in implementations of PBE::new_params
Diffstat (limited to 'src/pbes1.cpp')
-rw-r--r--src/pbes1.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pbes1.cpp b/src/pbes1.cpp
index 8e548f6b4..3126209b4 100644
--- a/src/pbes1.cpp
+++ b/src/pbes1.cpp
@@ -8,7 +8,6 @@
#include <botan/ber_dec.h>
#include <botan/parsing.h>
#include <botan/lookup.h>
-#include <botan/libstate.h>
#include <algorithm>
#include <memory>
@@ -82,11 +81,11 @@ void PBE_PKCS5v15::set_key(const std::string& passphrase)
/*************************************************
* Create a new set of PBES1 parameters *
*************************************************/
-void PBE_PKCS5v15::new_params()
+void PBE_PKCS5v15::new_params(RandomNumberGenerator& rng)
{
iterations = 2048;
salt.create(8);
- global_state().randomize(salt, salt.size());
+ rng.randomize(salt, salt.size());
}
/*************************************************