aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-29 19:43:59 +0000
committerlloyd <[email protected]>2008-09-29 19:43:59 +0000
commit638e85f941b33ee0cfc5e3575b30badabd4a1982 (patch)
tree7645c78db6ce0e9496d723db8ae998a03203ff31
parent14c2ddcdf698000ab170e9325d4f7d774c0f2247 (diff)
Add missing files
-rw-r--r--src/core/get_pbe.h22
-rw-r--r--src/core/pk_pad.h58
2 files changed, 80 insertions, 0 deletions
diff --git a/src/core/get_pbe.h b/src/core/get_pbe.h
new file mode 100644
index 000000000..e7b434c1f
--- /dev/null
+++ b/src/core/get_pbe.h
@@ -0,0 +1,22 @@
+/*************************************************
+* PBE Lookup Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_LOOKUP_PBE_H__
+#define BOTAN_LOOKUP_PBE_H__
+
+#include <botan/pbe.h>
+#include <string>
+
+namespace Botan {
+
+/*************************************************
+* Get a PBE object *
+*************************************************/
+BOTAN_DLL PBE* get_pbe(const std::string&);
+BOTAN_DLL PBE* get_pbe(const OID&, DataSource&);
+
+}
+
+#endif
diff --git a/src/core/pk_pad.h b/src/core/pk_pad.h
new file mode 100644
index 000000000..ed1742155
--- /dev/null
+++ b/src/core/pk_pad.h
@@ -0,0 +1,58 @@
+/*************************************************
+* EME/EMSA Classes Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_PUBKEY_PAD_H__
+#define BOTAN_PUBKEY_PAD_H__
+
+#include <botan/base.h>
+#include <botan/rng.h>
+
+namespace Botan {
+
+/*************************************************
+* Encoding Method for Encryption *
+*************************************************/
+class BOTAN_DLL EME
+ {
+ public:
+ virtual u32bit maximum_input_size(u32bit) const = 0;
+
+ SecureVector<byte> encode(const byte[], u32bit, u32bit,
+ RandomNumberGenerator&) const;
+ SecureVector<byte> encode(const MemoryRegion<byte>&, u32bit,
+ RandomNumberGenerator&) const;
+
+ SecureVector<byte> decode(const byte[], u32bit, u32bit) const;
+ SecureVector<byte> decode(const MemoryRegion<byte>&, u32bit) const;
+
+ virtual ~EME() {}
+ private:
+ virtual SecureVector<byte> pad(const byte[], u32bit, u32bit,
+ RandomNumberGenerator&) const = 0;
+
+ virtual SecureVector<byte> unpad(const byte[], u32bit, u32bit) const = 0;
+ };
+
+/*************************************************
+* Encoding Method for Signatures, Appendix *
+*************************************************/
+class BOTAN_DLL EMSA
+ {
+ public:
+ virtual void update(const byte[], u32bit) = 0;
+ virtual SecureVector<byte> raw_data() = 0;
+
+ virtual SecureVector<byte> encoding_of(const MemoryRegion<byte>&,
+ u32bit,
+ RandomNumberGenerator& rng) = 0;
+
+ virtual bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&,
+ u32bit) throw() = 0;
+ virtual ~EMSA() {}
+ };
+
+}
+
+#endif