diff options
Diffstat (limited to 'src/lib/mac')
-rw-r--r-- | src/lib/mac/gmac/gmac.cpp | 9 | ||||
-rw-r--r-- | src/lib/mac/gmac/gmac.h | 12 | ||||
-rw-r--r-- | src/lib/mac/mac.cpp | 2 |
3 files changed, 17 insertions, 6 deletions
diff --git a/src/lib/mac/gmac/gmac.cpp b/src/lib/mac/gmac/gmac.cpp index be27aba4a..a4e84f57b 100644 --- a/src/lib/mac/gmac/gmac.cpp +++ b/src/lib/mac/gmac/gmac.cpp @@ -7,6 +7,8 @@ */ #include <botan/gmac.h> +#include <botan/ghash.h> +#include <botan/block_cipher.h> namespace Botan { @@ -28,6 +30,13 @@ void GMAC::clear() m_initialized = false; } +GMAC::~GMAC() { /* for unique_ptr */ } + +Key_Length_Specification GMAC::key_spec() const + { + return m_cipher->key_spec(); + } + std::string GMAC::name() const { return "GMAC(" + m_cipher->name() + ")"; diff --git a/src/lib/mac/gmac/gmac.h b/src/lib/mac/gmac/gmac.h index ef54a42bf..83094a5bc 100644 --- a/src/lib/mac/gmac/gmac.h +++ b/src/lib/mac/gmac/gmac.h @@ -10,11 +10,12 @@ #define BOTAN_GMAC_H_ #include <botan/mac.h> -#include <botan/gcm.h> -#include <botan/block_cipher.h> namespace Botan { +class BlockCipher; +class GHASH; + /** * GMAC * @@ -29,10 +30,7 @@ class BOTAN_PUBLIC_API(2,0) GMAC final : public MessageAuthenticationCode size_t output_length() const override; MessageAuthenticationCode* clone() const override; - Key_Length_Specification key_spec() const override - { - return m_cipher->key_spec(); - } + Key_Length_Specification key_spec() const override; /** * Creates a new GMAC instance. @@ -44,6 +42,8 @@ class BOTAN_PUBLIC_API(2,0) GMAC final : public MessageAuthenticationCode GMAC(const GMAC&) = delete; GMAC& operator=(const GMAC&) = delete; + virtual ~GMAC(); + private: void add_data(const uint8_t[], size_t) override; void final_result(uint8_t[]) override; diff --git a/src/lib/mac/mac.cpp b/src/lib/mac/mac.cpp index 053e36b6f..65107470b 100644 --- a/src/lib/mac/mac.cpp +++ b/src/lib/mac/mac.cpp @@ -19,10 +19,12 @@ #if defined(BOTAN_HAS_GMAC) #include <botan/gmac.h> + #include <botan/block_cipher.h> #endif #if defined(BOTAN_HAS_HMAC) #include <botan/hmac.h> + #include <botan/hash.h> #endif #if defined(BOTAN_HAS_POLY1305) |