From 616741d4ea7ccdb575dfc6be872d496d6c635fa1 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 30 Mar 2018 00:10:26 -0400 Subject: Add missing function body for PKCS5_PBKDF1::DeriveKey (GH #610) Not sure how I missed that entire body... Also added a default timeInSeconds to all PBKDFs --- validat3.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'validat3.cpp') 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); -- cgit v1.2.1