aboutsummaryrefslogtreecommitdiffstats
path: root/src/pbe/pbes1/pbes1.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pbe/pbes1/pbes1.h')
-rw-r--r--src/pbe/pbes1/pbes1.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/pbe/pbes1/pbes1.h b/src/pbe/pbes1/pbes1.h
new file mode 100644
index 000000000..89d611b4e
--- /dev/null
+++ b/src/pbe/pbes1/pbes1.h
@@ -0,0 +1,42 @@
+/*************************************************
+* PKCS #5 v1.5 PBE Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_PBE_PKCS_V15_H__
+#define BOTAN_PBE_PKCS_V15_H__
+
+#include <botan/pbe.h>
+#include <botan/pipe.h>
+#include <botan/enums.h>
+
+namespace Botan {
+
+/*************************************************
+* PKCS#5 v1.5 PBE *
+*************************************************/
+class BOTAN_DLL PBE_PKCS5v15 : public PBE
+ {
+ public:
+ void write(const byte[], u32bit);
+ void start_msg();
+ void end_msg();
+ PBE_PKCS5v15(const std::string&, const std::string&, Cipher_Dir);
+ private:
+ void set_key(const std::string&);
+ 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;
+ SecureVector<byte> salt, key, iv;
+ u32bit iterations;
+ Pipe pipe;
+ };
+
+}
+
+#endif