summaryrefslogtreecommitdiff
path: root/validat3.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-03-30 00:10:26 -0400
committerJeffrey Walton <noloader@gmail.com>2018-03-30 00:10:26 -0400
commit616741d4ea7ccdb575dfc6be872d496d6c635fa1 (patch)
treedd9ed41bb735f621cdffe9cf8b36c7537668a645 /validat3.cpp
parent57a35a6896c85df0d0466f3a99c8c54d12c4c2ba (diff)
downloadcryptopp-git-616741d4ea7ccdb575dfc6be872d496d6c635fa1.tar.gz
Add missing function body for PKCS5_PBKDF1<T>::DeriveKey (GH #610)
Not sure how I missed that entire body... Also added a default timeInSeconds to all PBKDFs
Diffstat (limited to 'validat3.cpp')
-rw-r--r--validat3.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/validat3.cpp b/validat3.cpp
index ddef73c2..add46a89 100644
--- a/validat3.cpp
+++ b/validat3.cpp
@@ -583,9 +583,10 @@ bool TestPBKDF(KeyDerivationFunction &pbkdf, const PBKDF_TestTuple *testSet, uns
StringSource(tuple.hexSalt, true, new HexDecoder(new StringSink(salt)));
StringSource(tuple.hexDerivedKey, true, new HexDecoder(new StringSink(derivedKey)));
+ double timeInSeconds = 0.0f;
AlgorithmParameters params = MakeParameters("Purpose", (int)tuple.purpose)
(Name::Salt(), ConstByteArrayParameter((const byte*)&salt[0], salt.size()))
- ("Iterations", (int)tuple.iterations);
+ ("Iterations", (int)tuple.iterations)("TimeInSeconds", timeInSeconds);
SecByteBlock derived(derivedKey.size());
pbkdf.DeriveKey(derived, derived.size(), (const byte *)password.data(), password.size(), params);