diff options
Diffstat (limited to 'src/lib/mac/gmac')
-rw-r--r-- | src/lib/mac/gmac/gmac.cpp | 14 | ||||
-rw-r--r-- | src/lib/mac/gmac/gmac.h | 4 |
2 files changed, 4 insertions, 14 deletions
diff --git a/src/lib/mac/gmac/gmac.cpp b/src/lib/mac/gmac/gmac.cpp index 946e22cf0..4461cf370 100644 --- a/src/lib/mac/gmac/gmac.cpp +++ b/src/lib/mac/gmac/gmac.cpp @@ -64,17 +64,7 @@ void GMAC::key_schedule(const byte key[], size_t size) m_cipher->encrypt(m_H_ad.data(), m_H.data()); } -void GMAC::start(const std::vector<byte>& nonce) - { - start(nonce.data(), nonce.size()); - } - -void GMAC::start(const secure_vector<byte>& nonce) - { - start(nonce.data(), nonce.size()); - } - -void GMAC::start(const byte nonce[], size_t nonce_len) +void GMAC::start_msg(const byte nonce[], size_t nonce_len) { secure_vector<byte> y0(GCM_BS); @@ -118,6 +108,6 @@ void GMAC::final_result(byte mac[]) MessageAuthenticationCode* GMAC::clone() const { - return new GMAC(BlockCipher::create(m_cipher->name()).release()); + return new GMAC(m_cipher->clone()); } } diff --git a/src/lib/mac/gmac/gmac.h b/src/lib/mac/gmac/gmac.h index b651c2e11..b05c5451f 100644 --- a/src/lib/mac/gmac/gmac.h +++ b/src/lib/mac/gmac/gmac.h @@ -53,7 +53,7 @@ class BOTAN_DLL GMAC : public MessageAuthenticationCode, */ void start(const std::vector<byte>& nonce); - Key_Length_Specification key_spec() const + Key_Length_Specification key_spec() const override { return m_cipher->key_spec(); } @@ -71,7 +71,7 @@ class BOTAN_DLL GMAC : public MessageAuthenticationCode, private: void add_data(const byte[], size_t) override; void final_result(byte[]) override; - void start_msg(const byte nonce[], size_t nonce_len); + void start_msg(const byte nonce[], size_t nonce_len) override; void key_schedule(const byte key[], size_t size) override; static const size_t GCM_BS = 16; |