aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/kdf/kdf.cpp
diff options
context:
space:
mode:
authorKrzysztof Kwiatkowski <[email protected]>2017-05-02 23:17:32 +0100
committerKrzysztof Kwiatkowski <[email protected]>2017-05-03 00:44:35 +0100
commit827a62c7880d1f1b15010e088195f20a8b6304ec (patch)
treece53ae95a8a8eb39d8b1d403c81372cd15a6acc6 /src/lib/kdf/kdf.cpp
parent576ada6d0b1ae20b781d487ba9bbeaadef17b202 (diff)
SP800-56A revision 2 implementation
Diffstat (limited to 'src/lib/kdf/kdf.cpp')
-rw-r--r--src/lib/kdf/kdf.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/kdf/kdf.cpp b/src/lib/kdf/kdf.cpp
index 122719f6d..695523d8e 100644
--- a/src/lib/kdf/kdf.cpp
+++ b/src/lib/kdf/kdf.cpp
@@ -193,9 +193,9 @@ std::unique_ptr<KDF> KDF::create(const std::string& algo_spec,
if(req.algo_name() == "SP800-56A" && req.arg_count() == 1)
{
if(auto hash = HashFunction::create(req.arg(0)))
- {
- return std::unique_ptr<KDF>(new SP800_56A(hash.release()));
- }
+ return std::unique_ptr<KDF>(new SP800_56A<HashFunction>(hash.release()));
+ if(auto mac = MessageAuthenticationCode::create(req.arg(0)))
+ return std::unique_ptr<KDF>(new SP800_56A<MessageAuthenticationCode>(mac.release()));
}
#endif