aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pk_pad/emsa_pssr/pssr.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-03-27 14:12:25 +0000
committerlloyd <[email protected]>2014-03-27 14:12:25 +0000
commite5bf2f0b5c177c4bea8983b552106e90efb79083 (patch)
treea2711e933058ea6680b8e0679cfd95c0f51669cb /src/lib/pk_pad/emsa_pssr/pssr.cpp
parenteb0e85280e1feb4eaa66847fe60f9f6c713a8d4e (diff)
Support 0 length salts in PSSR. Bugzilla 268
Diffstat (limited to 'src/lib/pk_pad/emsa_pssr/pssr.cpp')
-rw-r--r--src/lib/pk_pad/emsa_pssr/pssr.cpp7
1 files changed, 6 insertions, 1 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)
{
}