aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_aead.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-08-09 09:54:31 -0400
committerJack Lloyd <[email protected]>2018-08-09 09:54:31 -0400
commitb6c18afbd44b5c70b61b0864bf3ba768ffc877d6 (patch)
tree4621d44267302a71575f21ebd78e44006d13c0af /src/tests/test_aead.cpp
parent25326f304dc5783940c92996e0e4853c38576ce9 (diff)
Fix shadow warnings
Diffstat (limited to 'src/tests/test_aead.cpp')
-rw-r--r--src/tests/test_aead.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tests/test_aead.cpp b/src/tests/test_aead.cpp
index 66a9fb3ea..ce9c3e095 100644
--- a/src/tests/test_aead.cpp
+++ b/src/tests/test_aead.cpp
@@ -41,7 +41,7 @@ class AEAD_Tests final : public Text_Based_Test
if(enc->associated_data_requires_key())
{
result.test_throws("Unkeyed object throws for set AD",
- [&]() { Botan::secure_vector<uint8_t> ad(16); enc->set_associated_data(ad.data(), ad.size()); });
+ [&]() { enc->set_associated_data(ad.data(), ad.size()); });
}
// First some tests for reset() to make sure it resets what we need it to
@@ -146,12 +146,12 @@ class AEAD_Tests final : public Text_Based_Test
enc->clear();
result.test_throws("Unkeyed object throws for encrypt after clear",
- [&]() { Botan::secure_vector<uint8_t> buf; enc->finish(buf); });
+ [&]() { enc->finish(buf); });
if(enc->associated_data_requires_key())
{
result.test_throws("Unkeyed object throws for set AD after clear",
- [&]() { Botan::secure_vector<uint8_t> ad(16); enc->set_associated_data(ad.data(), ad.size()); });
+ [&]() { enc->set_associated_data(ad.data(), ad.size()); });
}
return result;
@@ -173,7 +173,7 @@ class AEAD_Tests final : public Text_Based_Test
if(dec->associated_data_requires_key())
{
result.test_throws("Unkeyed object throws for set AD",
- [&]() { Botan::secure_vector<uint8_t> ad(16); dec->set_associated_data(ad.data(), ad.size()); });
+ [&]() { dec->set_associated_data(ad.data(), ad.size()); });
}
// First some tests for reset() to make sure it resets what we need it to
@@ -347,12 +347,12 @@ class AEAD_Tests final : public Text_Based_Test
dec->clear();
result.test_throws("Unkeyed object throws for decrypt",
- [&]() { Botan::secure_vector<uint8_t> buf; dec->finish(buf); });
+ [&]() { dec->finish(buf); });
if(dec->associated_data_requires_key())
{
result.test_throws("Unkeyed object throws for set AD",
- [&]() { Botan::secure_vector<uint8_t> ad(16); dec->set_associated_data(ad.data(), ad.size()); });
+ [&]() { dec->set_associated_data(ad.data(), ad.size()); });
}
return result;