From 89e20a742ada5000c8a78fbbf0bf8bd3b13565eb Mon Sep 17 00:00:00 2001 From: lloyd Date: Sun, 25 May 2008 20:51:30 +0000 Subject: Use RNG argument in EME_PKCS1v15::pad instead of global object --- src/eme_pkcs.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/eme_pkcs.cpp') diff --git a/src/eme_pkcs.cpp b/src/eme_pkcs.cpp index e6c9ae2d2..cd82c09d3 100644 --- a/src/eme_pkcs.cpp +++ b/src/eme_pkcs.cpp @@ -4,7 +4,6 @@ *************************************************/ #include -#include namespace Botan { @@ -13,7 +12,7 @@ namespace Botan { *************************************************/ SecureVector EME_PKCS1v15::pad(const byte in[], u32bit inlen, u32bit olen, - RandomNumberGenerator&) const + RandomNumberGenerator& rng) const { olen /= 8; @@ -27,7 +26,7 @@ SecureVector EME_PKCS1v15::pad(const byte in[], u32bit inlen, out[0] = 0x02; for(u32bit j = 1; j != olen - inlen - 1; ++j) while(out[j] == 0) - out[j] = global_state().random(); + out[j] = rng.random(); out.copy(olen - inlen, in, inlen); return out; -- cgit v1.2.3