aboutsummaryrefslogtreecommitdiffstats
path: root/src/rw.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-06-10 16:23:59 +0000
committerlloyd <[email protected]>2008-06-10 16:23:59 +0000
commit2aef9fa5bc25984a838a51a93ac0e918d2d1bbac (patch)
tree9f0b9035c4549380de6c62a7bf941a9396b8f554 /src/rw.cpp
parent7ab69d77956048fdc27f49a07724d6b21549b916 (diff)
Pass RandomNumberGenerator references to public key operations that need
them (encrypt and sign), with the intent of slowly bubbling up the access points to the API level, at which point the application handles managing the RNG. This will allow removing the compiled-in global PRNG, and make testing much simpler.
Diffstat (limited to 'src/rw.cpp')
-rw-r--r--src/rw.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rw.cpp b/src/rw.cpp
index 4da0cdede..2574df442 100644
--- a/src/rw.cpp
+++ b/src/rw.cpp
@@ -95,7 +95,8 @@ RW_PrivateKey::RW_PrivateKey(const BigInt& prime1, const BigInt& prime2,
/*************************************************
* Rabin-Williams Signature Operation *
*************************************************/
-SecureVector<byte> RW_PrivateKey::sign(const byte in[], u32bit len) const
+SecureVector<byte> RW_PrivateKey::sign(const byte in[], u32bit len,
+ RandomNumberGenerator&) const
{
BigInt i(in, len);
if(i >= n || i % 16 != 12)