aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-05-24 19:49:14 +0000
committerlloyd <[email protected]>2008-05-24 19:49:14 +0000
commit8283202b8bfd5fe088f87a91a3158bef0072311f (patch)
treec7e7c773a9658e1d4cb7cd03d94ffa10f443ec9a /include
parent440a5d6bd0de20027d8c094abdd1390ee23eae6f (diff)
Don't use the global PRNG in implementations of PBE::new_params
Diffstat (limited to 'include')
-rw-r--r--include/pbe.h4
-rw-r--r--include/pbe_pkcs.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/include/pbe.h b/include/pbe.h
index 323f37ce4..35d6d774d 100644
--- a/include/pbe.h
+++ b/include/pbe.h
@@ -19,9 +19,11 @@ class BOTAN_DLL PBE : public Filter
{
public:
virtual void set_key(const std::string&) = 0;
- virtual void new_params() = 0;
+ virtual void new_params(RandomNumberGenerator& rng) = 0;
+
virtual MemoryVector<byte> encode_params() const = 0;
virtual void decode_params(DataSource&) = 0;
+
virtual OID get_oid() const = 0;
};
diff --git a/include/pbe_pkcs.h b/include/pbe_pkcs.h
index a01f70e66..82f797b7b 100644
--- a/include/pbe_pkcs.h
+++ b/include/pbe_pkcs.h
@@ -24,10 +24,11 @@ class BOTAN_DLL PBE_PKCS5v15 : public PBE
PBE_PKCS5v15(const std::string&, const std::string&, Cipher_Dir);
private:
void set_key(const std::string&);
- void new_params();
+ void new_params(RandomNumberGenerator& rng);
MemoryVector<byte> encode_params() const;
void decode_params(DataSource&);
OID get_oid() const;
+
void flush_pipe(bool);
const Cipher_Dir direction;
const std::string digest, cipher;
@@ -49,10 +50,11 @@ class BOTAN_DLL PBE_PKCS5v20 : public PBE
PBE_PKCS5v20(const std::string&, const std::string&);
private:
void set_key(const std::string&);
- void new_params();
+ void new_params(RandomNumberGenerator& rng);
MemoryVector<byte> encode_params() const;
void decode_params(DataSource&);
OID get_oid() const;
+
void flush_pipe(bool);
bool known_cipher(const std::string&) const;