aboutsummaryrefslogtreecommitdiffstats
path: root/src/pbe/pbes1/pbes1.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-11 02:51:40 +0000
committerlloyd <[email protected]>2008-11-11 02:51:40 +0000
commit290f6c94ed43e4b5e30d0208e2a9e3a0a1eca2e7 (patch)
tree4239af13767f5b6dfdd2c69061bc6c8042f7b614 /src/pbe/pbes1/pbes1.h
parent686f1b30a4a7be70697644a071d50973a547f58e (diff)
Remove global state dependency from pbes1
Diffstat (limited to 'src/pbe/pbes1/pbes1.h')
-rw-r--r--src/pbe/pbes1/pbes1.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/pbe/pbes1/pbes1.h b/src/pbe/pbes1/pbes1.h
index 78363c68b..2c96a8d1e 100644
--- a/src/pbe/pbes1/pbes1.h
+++ b/src/pbe/pbes1/pbes1.h
@@ -7,7 +7,8 @@
#define BOTAN_PBE_PKCS_V15_H__
#include <botan/pbe.h>
-#include <botan/sym_algo.h>
+#include <botan/block_cipher.h>
+#include <botan/hash.h>
#include <botan/pipe.h>
namespace Botan {
@@ -21,7 +22,12 @@ class BOTAN_DLL PBE_PKCS5v15 : public PBE
void write(const byte[], u32bit);
void start_msg();
void end_msg();
- PBE_PKCS5v15(const std::string&, const std::string&, Cipher_Dir);
+
+ PBE_PKCS5v15(BlockCipher* cipher,
+ HashFunction* hash,
+ Cipher_Dir);
+
+ ~PBE_PKCS5v15();
private:
void set_key(const std::string&);
void new_params(RandomNumberGenerator& rng);
@@ -30,8 +36,11 @@ class BOTAN_DLL PBE_PKCS5v15 : public PBE
OID get_oid() const;
void flush_pipe(bool);
- const Cipher_Dir direction;
- const std::string digest, cipher;
+
+ Cipher_Dir direction;
+ BlockCipher* block_cipher;
+ HashFunction* hash_function;
+
SecureVector<byte> salt, key, iv;
u32bit iterations;
Pipe pipe;