diff options
Diffstat (limited to 'src/lib/mac/hmac')
-rw-r--r-- | src/lib/mac/hmac/hmac.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/mac/hmac/hmac.cpp b/src/lib/mac/hmac/hmac.cpp index 12525f088..1c6821a54 100644 --- a/src/lib/mac/hmac/hmac.cpp +++ b/src/lib/mac/hmac/hmac.cpp @@ -14,7 +14,10 @@ namespace Botan { HMAC* HMAC::make(const Spec& spec) { if(spec.arg_count() == 1) - return new HMAC(Algo_Registry<HashFunction>::global_registry().make(spec.arg(0))); + { + if(HashFunction* h = get_hash_function(spec.arg(0))) + return new HMAC(h); + } return nullptr; } |