From 827a62c7880d1f1b15010e088195f20a8b6304ec Mon Sep 17 00:00:00 2001 From: Krzysztof Kwiatkowski Date: Tue, 2 May 2017 23:17:32 +0100 Subject: SP800-56A revision 2 implementation --- src/lib/kdf/kdf.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/kdf/kdf.cpp') 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::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(new SP800_56A(hash.release())); - } + return std::unique_ptr(new SP800_56A(hash.release())); + if(auto mac = MessageAuthenticationCode::create(req.arg(0))) + return std::unique_ptr(new SP800_56A(mac.release())); } #endif -- cgit v1.2.3