aboutsummaryrefslogtreecommitdiffstats
path: root/include/eme.h
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 /include/eme.h
parent8283202b8bfd5fe088f87a91a3158bef0072311f (diff)
Pass an RNG reference to EME::pad
PK_Encryptor_MR_with_EME::enc references the global PRNG currently
Diffstat (limited to 'include/eme.h')
-rw-r--r--include/eme.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/eme.h b/include/eme.h
index 738ed5e1e..42eecea4e 100644
--- a/include/eme.h
+++ b/include/eme.h
@@ -21,8 +21,10 @@ class BOTAN_DLL EME1 : public EME
EME1(const std::string&, const std::string&, const std::string& = "");
~EME1() { delete mgf; }
private:
- SecureVector<byte> pad(const byte[], u32bit, u32bit) const;
+ SecureVector<byte> pad(const byte[], u32bit, u32bit,
+ RandomNumberGenerator&) const;
SecureVector<byte> unpad(const byte[], u32bit, u32bit) const;
+
const u32bit HASH_LENGTH;
SecureVector<byte> Phash;
MGF* mgf;
@@ -36,7 +38,8 @@ class BOTAN_DLL EME_PKCS1v15 : public EME
public:
u32bit maximum_input_size(u32bit) const;
private:
- SecureVector<byte> pad(const byte[], u32bit, u32bit) const;
+ SecureVector<byte> pad(const byte[], u32bit, u32bit,
+ RandomNumberGenerator&) const;
SecureVector<byte> unpad(const byte[], u32bit, u32bit) const;
};