aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/pk_pad/emsa_pssr/pssr.cpp7
-rw-r--r--src/lib/pk_pad/emsa_pssr/pssr.h8
2 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/pk_pad/emsa_pssr/pssr.cpp b/src/lib/pk_pad/emsa_pssr/pssr.cpp
index 663d8089c..fa3748732 100644
--- a/src/lib/pk_pad/emsa_pssr/pssr.cpp
+++ b/src/lib/pk_pad/emsa_pssr/pssr.cpp
@@ -126,8 +126,13 @@ bool PSSR::verify(const secure_vector<byte>& const_coded,
return same_mem(&H[0], &H2[0], HASH_SIZE);
}
+PSSR::PSSR(HashFunction* h) :
+ SALT_SIZE(h->output_length()), hash(h)
+ {
+ }
+
PSSR::PSSR(HashFunction* h, size_t salt_size) :
- SALT_SIZE(salt_size ? salt_size : h->output_length()), hash(h)
+ SALT_SIZE(salt_size), hash(h)
{
}
diff --git a/src/lib/pk_pad/emsa_pssr/pssr.h b/src/lib/pk_pad/emsa_pssr/pssr.h
index 7693518f9..688fd2114 100644
--- a/src/lib/pk_pad/emsa_pssr/pssr.h
+++ b/src/lib/pk_pad/emsa_pssr/pssr.h
@@ -22,10 +22,14 @@ class BOTAN_DLL PSSR : public EMSA
/**
* @param hash the hash object to use
+ */
+ PSSR(HashFunction* hash);
+
+ /**
+ * @param hash the hash object to use
* @param salt_size the size of the salt to use in bytes
- * or zero to use the default
*/
- PSSR(HashFunction* hash, size_t salt_size = 0);
+ PSSR(HashFunction* hash, size_t salt_size);
private:
void update(const byte input[], size_t length);