aboutsummaryrefslogtreecommitdiffstats
path: root/src/pk_pad
diff options
context:
space:
mode:
Diffstat (limited to 'src/pk_pad')
-rw-r--r--src/pk_pad/emsa1/emsa1.h3
-rw-r--r--src/pk_pad/emsa1_bsi/emsa1_bsi.h3
-rw-r--r--src/pk_pad/emsa2/emsa2.h3
-rw-r--r--src/pk_pad/emsa3/emsa3.cpp22
-rw-r--r--src/pk_pad/emsa3/emsa3.h5
-rw-r--r--src/pk_pad/emsa4/emsa4.h12
6 files changed, 34 insertions, 14 deletions
diff --git a/src/pk_pad/emsa1/emsa1.h b/src/pk_pad/emsa1/emsa1.h
index e95414ad3..50fda5273 100644
--- a/src/pk_pad/emsa1/emsa1.h
+++ b/src/pk_pad/emsa1/emsa1.h
@@ -20,6 +20,9 @@ namespace Botan {
class BOTAN_DLL EMSA1 : public EMSA
{
public:
+ /**
+ * @param h the hash object to use
+ */
EMSA1(HashFunction* h) : hash(h) {}
~EMSA1() { delete hash; }
protected:
diff --git a/src/pk_pad/emsa1_bsi/emsa1_bsi.h b/src/pk_pad/emsa1_bsi/emsa1_bsi.h
index ec86d40e2..a0a3515fb 100644
--- a/src/pk_pad/emsa1_bsi/emsa1_bsi.h
+++ b/src/pk_pad/emsa1_bsi/emsa1_bsi.h
@@ -21,6 +21,9 @@ implementation comes from InSiTo
class BOTAN_DLL EMSA1_BSI : public EMSA1
{
public:
+ /**
+ * @param hash the hash object to use
+ */
EMSA1_BSI(HashFunction* hash) : EMSA1(hash) {}
private:
SecureVector<byte> encoding_of(const MemoryRegion<byte>&, u32bit,
diff --git a/src/pk_pad/emsa2/emsa2.h b/src/pk_pad/emsa2/emsa2.h
index bda34fbd1..cfb3f9e12 100644
--- a/src/pk_pad/emsa2/emsa2.h
+++ b/src/pk_pad/emsa2/emsa2.h
@@ -20,6 +20,9 @@ namespace Botan {
class BOTAN_DLL EMSA2 : public EMSA
{
public:
+ /**
+ * @param hash the hash object to use
+ */
EMSA2(HashFunction* hash);
~EMSA2() { delete hash; }
private:
diff --git a/src/pk_pad/emsa3/emsa3.cpp b/src/pk_pad/emsa3/emsa3.cpp
index dc905a464..82981d38c 100644
--- a/src/pk_pad/emsa3/emsa3.cpp
+++ b/src/pk_pad/emsa3/emsa3.cpp
@@ -12,7 +12,7 @@ namespace Botan {
namespace {
-/**
+/*
* EMSA3 Encode Operation
*/
SecureVector<byte> emsa3_encoding(const MemoryRegion<byte>& msg,
@@ -37,7 +37,7 @@ SecureVector<byte> emsa3_encoding(const MemoryRegion<byte>& msg,
}
-/**
+/*
* EMSA3 Update Operation
*/
void EMSA3::update(const byte input[], u32bit length)
@@ -45,7 +45,7 @@ void EMSA3::update(const byte input[], u32bit length)
hash->update(input, length);
}
-/**
+/*
* Return the raw (unencoded) data
*/
SecureVector<byte> EMSA3::raw_data()
@@ -53,7 +53,7 @@ SecureVector<byte> EMSA3::raw_data()
return hash->final();
}
-/**
+/*
* EMSA3 Encode Operation
*/
SecureVector<byte> EMSA3::encoding_of(const MemoryRegion<byte>& msg,
@@ -67,7 +67,7 @@ SecureVector<byte> EMSA3::encoding_of(const MemoryRegion<byte>& msg,
hash_id, hash_id.size());
}
-/**
+/*
* Default signature decoding
*/
bool EMSA3::verify(const MemoryRegion<byte>& coded,
@@ -88,7 +88,7 @@ bool EMSA3::verify(const MemoryRegion<byte>& coded,
}
}
-/**
+/*
* EMSA3 Constructor
*/
EMSA3::EMSA3(HashFunction* hash_in) : hash(hash_in)
@@ -96,7 +96,7 @@ EMSA3::EMSA3(HashFunction* hash_in) : hash(hash_in)
hash_id = pkcs_hash_id(hash->name());
}
-/**
+/*
* EMSA3 Destructor
*/
EMSA3::~EMSA3()
@@ -104,7 +104,7 @@ EMSA3::~EMSA3()
delete hash;
}
-/**
+/*
* EMSA3_Raw Update Operation
*/
void EMSA3_Raw::update(const byte input[], u32bit length)
@@ -112,7 +112,7 @@ void EMSA3_Raw::update(const byte input[], u32bit length)
message.append(input, length);
}
-/**
+/*
* Return the raw (unencoded) data
*/
SecureVector<byte> EMSA3_Raw::raw_data()
@@ -122,7 +122,7 @@ SecureVector<byte> EMSA3_Raw::raw_data()
return ret;
}
-/**
+/*
* EMSA3_Raw Encode Operation
*/
SecureVector<byte> EMSA3_Raw::encoding_of(const MemoryRegion<byte>& msg,
@@ -132,7 +132,7 @@ SecureVector<byte> EMSA3_Raw::encoding_of(const MemoryRegion<byte>& msg,
return emsa3_encoding(msg, output_bits, 0, 0);
}
-/**
+/*
* Default signature decoding
*/
bool EMSA3_Raw::verify(const MemoryRegion<byte>& coded,
diff --git a/src/pk_pad/emsa3/emsa3.h b/src/pk_pad/emsa3/emsa3.h
index 1e080aab6..09c1e40cc 100644
--- a/src/pk_pad/emsa3/emsa3.h
+++ b/src/pk_pad/emsa3/emsa3.h
@@ -21,7 +21,10 @@ namespace Botan {
class BOTAN_DLL EMSA3 : public EMSA
{
public:
- EMSA3(HashFunction*);
+ /**
+ * @param hash the hash object to use
+ */
+ EMSA3(HashFunction* hash);
~EMSA3();
void update(const byte[], u32bit);
diff --git a/src/pk_pad/emsa4/emsa4.h b/src/pk_pad/emsa4/emsa4.h
index 6315c424e..7dfc3892a 100644
--- a/src/pk_pad/emsa4/emsa4.h
+++ b/src/pk_pad/emsa4/emsa4.h
@@ -20,8 +20,16 @@ namespace Botan {
class BOTAN_DLL EMSA4 : public EMSA
{
public:
- EMSA4(HashFunction*);
- EMSA4(HashFunction*, u32bit);
+ /**
+ * @param hash the hash object to use
+ */
+ EMSA4(HashFunction* hash);
+
+ /**
+ * @param hash the hash object to use
+ * @param salt_size the size of the salt to use in bytes
+ */
+ EMSA4(HashFunction* hash, u32bit salt_size);
~EMSA4() { delete hash; delete mgf; }
private: