aboutsummaryrefslogtreecommitdiffstats
path: root/modules/pk_pad/emsa3
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pk_pad/emsa3')
-rw-r--r--modules/pk_pad/emsa3/emsa3.h38
-rw-r--r--modules/pk_pad/emsa3/modinfo.txt10
2 files changed, 48 insertions, 0 deletions
diff --git a/modules/pk_pad/emsa3/emsa3.h b/modules/pk_pad/emsa3/emsa3.h
new file mode 100644
index 000000000..fa8521216
--- /dev/null
+++ b/modules/pk_pad/emsa3/emsa3.h
@@ -0,0 +1,38 @@
+/*************************************************
+* EMSA3 Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_EMSA3_H__
+#define BOTAN_EMSA3_H__
+
+#include <botan/pk_util.h>
+
+namespace Botan {
+
+/*************************************************
+* EMSA3 *
+*************************************************/
+class BOTAN_DLL EMSA3 : public EMSA
+ {
+ public:
+ EMSA3(const std::string&);
+ ~EMSA3() { delete hash; }
+ private:
+ void update(const byte[], u32bit);
+
+ SecureVector<byte> raw_data();
+
+ SecureVector<byte> encoding_of(const MemoryRegion<byte>&, u32bit,
+ RandomNumberGenerator& rng);
+
+ bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&,
+ u32bit) throw();
+
+ HashFunction* hash;
+ SecureVector<byte> hash_id;
+ };
+
+}
+
+#endif
diff --git a/modules/pk_pad/emsa3/modinfo.txt b/modules/pk_pad/emsa3/modinfo.txt
new file mode 100644
index 000000000..926f9a4e8
--- /dev/null
+++ b/modules/pk_pad/emsa3/modinfo.txt
@@ -0,0 +1,10 @@
+realname "EMSA3"
+
+define EMSA3
+
+load_on auto
+
+<add>
+emsa3.h
+emsa3.cpp
+</add>