diff options
Diffstat (limited to 'src/lib/mac/hmac/hmac.cpp')
-rw-r--r-- | src/lib/mac/hmac/hmac.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/mac/hmac/hmac.cpp b/src/lib/mac/hmac/hmac.cpp index 532c98274..72c617c5b 100644 --- a/src/lib/mac/hmac/hmac.cpp +++ b/src/lib/mac/hmac/hmac.cpp @@ -100,8 +100,8 @@ MessageAuthenticationCode* HMAC::clone() const */ HMAC::HMAC(HashFunction* hash) : m_hash(hash) { - if(m_hash->hash_block_size() == 0) - throw Invalid_Argument("HMAC cannot be used with " + m_hash->name()); + BOTAN_ARG_CHECK(m_hash->hash_block_size() > 0, + "HMAC is not compatible with this hash function"); } } |