aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/mac/gmac
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-30 12:17:39 -0400
committerJack Lloyd <[email protected]>2017-09-30 12:17:39 -0400
commit62eb9857a46ddc508798176e3f77830ff0034e1b (patch)
tree43388f1a63236f82de13d9d308ac8fda79d201c5 /src/lib/mac/gmac
parentf6dc3db8bb7e31569ed1a6042771e3f529aefab8 (diff)
Address some MSVC warnings
Diffstat (limited to 'src/lib/mac/gmac')
-rw-r--r--src/lib/mac/gmac/gmac.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/mac/gmac/gmac.cpp b/src/lib/mac/gmac/gmac.cpp
index 5e08a8827..7ce546ad5 100644
--- a/src/lib/mac/gmac/gmac.cpp
+++ b/src/lib/mac/gmac/gmac.cpp
@@ -90,9 +90,8 @@ void GMAC::final_result(uint8_t mac[])
// This ensures the GMAC computation has been initialized with a fresh
// nonce. The aim of this check is to prevent developers from re-using
// nonces (and potential nonce-reuse attacks).
- BOTAN_ASSERT(m_initialized,
- "The GMAC computation has not been initialized with a fresh "
- "nonce.");
+ BOTAN_ASSERT(m_initialized, "GMAC was used with a fresh nonce");
+
// process the rest of the aad buffer. Even if it is a partial block only
// ghash_update will process it properly.
if(m_aad_buf.size() > 0)
@@ -102,7 +101,7 @@ void GMAC::final_result(uint8_t mac[])
m_aad_buf.size());
}
secure_vector<uint8_t> result = GHASH::final();
- std::copy(result.begin(), result.end(), mac);
+ copy_mem(mac, result.data(), result.size());
clear();
}