diff options
Diffstat (limited to 'src/mac/hmac')
-rw-r--r-- | src/mac/hmac/hmac.cpp | 3 | ||||
-rw-r--r-- | src/mac/hmac/hmac.h | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/mac/hmac/hmac.cpp b/src/mac/hmac/hmac.cpp index 06923138a..284bc87ec 100644 --- a/src/mac/hmac/hmac.cpp +++ b/src/mac/hmac/hmac.cpp @@ -85,8 +85,7 @@ MessageAuthenticationCode* HMAC::clone() const * HMAC Constructor */ HMAC::HMAC(HashFunction* hash_in) : - MessageAuthenticationCode(hash_in->output_length(), - 0, 2*hash_in->hash_block_size()), + MessageAuthenticationCode(hash_in->output_length()), hash(hash_in) { if(hash->hash_block_size() == 0) diff --git a/src/mac/hmac/hmac.h b/src/mac/hmac/hmac.h index 33af62f6a..505d0dd6b 100644 --- a/src/mac/hmac/hmac.h +++ b/src/mac/hmac/hmac.h @@ -23,6 +23,11 @@ class BOTAN_DLL HMAC : public MessageAuthenticationCode std::string name() const; MessageAuthenticationCode* clone() const; + Key_Length_Specification key_spec() const + { + return Key_Length_Specification(0, 2*hash->hash_block_size()); + } + /** * @param hash the hash to use for HMACing */ |