summaryrefslogtreecommitdiffstats
path: root/botan/src/pk_pad/emsa1_bsi/emsa1_bsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'botan/src/pk_pad/emsa1_bsi/emsa1_bsi.h')
-rw-r--r--botan/src/pk_pad/emsa1_bsi/emsa1_bsi.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/botan/src/pk_pad/emsa1_bsi/emsa1_bsi.h b/botan/src/pk_pad/emsa1_bsi/emsa1_bsi.h
new file mode 100644
index 0000000..ec86d40
--- /dev/null
+++ b/botan/src/pk_pad/emsa1_bsi/emsa1_bsi.h
@@ -0,0 +1,32 @@
+/*
+* EMSA1 BSI Variant
+* (C) 1999-2008 Jack Lloyd
+* 2007 FlexSecure GmbH
+*
+* Distributed under the terms of the Botan license
+*/
+
+#ifndef BOTAN_EMSA1_BSI_H__
+#define BOTAN_EMSA1_BSI_H__
+
+#include <botan/emsa1.h>
+
+namespace Botan {
+
+/**
+EMSA1_BSI is a variant of EMSA1 specified by the BSI. It accepts only
+hash values which are less or equal than the maximum key length. The
+implementation comes from InSiTo
+*/
+class BOTAN_DLL EMSA1_BSI : public EMSA1
+ {
+ public:
+ EMSA1_BSI(HashFunction* hash) : EMSA1(hash) {}
+ private:
+ SecureVector<byte> encoding_of(const MemoryRegion<byte>&, u32bit,
+ RandomNumberGenerator& rng);
+ };
+
+}
+
+#endif