aboutsummaryrefslogtreecommitdiffstats
path: root/src/pk_util.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-05-24 19:56:35 +0000
committerlloyd <[email protected]>2008-05-24 19:56:35 +0000
commit7d9843775ec5d28c15d1070223185575cebe46ec (patch)
tree04d7053b50c57efc7654bcb082d7850bc1187926 /src/pk_util.cpp
parent8283202b8bfd5fe088f87a91a3158bef0072311f (diff)
Pass an RNG reference to EME::pad
PK_Encryptor_MR_with_EME::enc references the global PRNG currently
Diffstat (limited to 'src/pk_util.cpp')
-rw-r--r--src/pk_util.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pk_util.cpp b/src/pk_util.cpp
index 86f3578ab..c5f7f8d67 100644
--- a/src/pk_util.cpp
+++ b/src/pk_util.cpp
@@ -11,18 +11,20 @@ namespace Botan {
* Encode a message *
*************************************************/
SecureVector<byte> EME::encode(const byte msg[], u32bit msg_len,
- u32bit key_bits) const
+ u32bit key_bits,
+ RandomNumberGenerator& rng) const
{
- return pad(msg, msg_len, key_bits);
+ return pad(msg, msg_len, key_bits, rng);
}
/*************************************************
* Encode a message *
*************************************************/
SecureVector<byte> EME::encode(const MemoryRegion<byte>& msg,
- u32bit key_bits) const
+ u32bit key_bits,
+ RandomNumberGenerator& rng) const
{
- return pad(msg, msg.size(), key_bits);
+ return pad(msg, msg.size(), key_bits, rng);
}
/*************************************************