aboutsummaryrefslogtreecommitdiffstats
path: root/src/s2k.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-05-24 18:54:35 +0000
committerlloyd <[email protected]>2008-05-24 18:54:35 +0000
commit0d31ffcbc89d232e2682110733ca2d969af1e15e (patch)
tree13964c2c10eec341e3765d02b603998d205f42b5 /src/s2k.cpp
parentf8078f5904fce5cbfd69516b175872496bdc2267 (diff)
Avoid global RNG in S2K::new_random_salt (RNG reference passed as argument instead)
Diffstat (limited to 'src/s2k.cpp')
-rw-r--r--src/s2k.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/s2k.cpp b/src/s2k.cpp
index e5668f32f..9c67aef10 100644
--- a/src/s2k.cpp
+++ b/src/s2k.cpp
@@ -4,7 +4,6 @@
*************************************************/
#include <botan/s2k.h>
-#include <botan/libstate.h>
namespace Botan {
@@ -44,10 +43,11 @@ void S2K::change_salt(const MemoryRegion<byte>& new_salt)
/*************************************************
* Create a new random salt *
*************************************************/
-void S2K::new_random_salt(u32bit length)
+void S2K::new_random_salt(RandomNumberGenerator& rng,
+ u32bit length)
{
salt.create(length);
- global_state().randomize(salt, length);
+ rng.randomize(salt, length);
}
}