aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_stream.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-09-15 09:16:46 -0400
committerJack Lloyd <[email protected]>2016-09-15 09:25:49 -0400
commit04bf8dc51861bab37d6260de8b318dc71ea4bba7 (patch)
tree03cf4b8d607607444049bc2b9880abc4c1fc6a8e /src/tests/test_stream.cpp
parenta7eba3629cc0d76444f5241fb4b9e8793ddb61cd (diff)
Add T::provider() to allow user to inquire about implementation used
For block ciphers, stream ciphers, hashes, MACs, and cipher modes. Cipher_Mode already had it, with a slightly different usage.
Diffstat (limited to 'src/tests/test_stream.cpp')
-rw-r--r--src/tests/test_stream.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tests/test_stream.cpp b/src/tests/test_stream.cpp
index be7b9a548..6097fd3e8 100644
--- a/src/tests/test_stream.cpp
+++ b/src/tests/test_stream.cpp
@@ -41,16 +41,18 @@ class Stream_Cipher_Tests : public Text_Based_Test
return result;
}
- for(auto&& provider: providers)
+ for(auto&& provider_ask : providers)
{
- std::unique_ptr<Botan::StreamCipher> cipher(Botan::StreamCipher::create(algo, provider));
+ std::unique_ptr<Botan::StreamCipher> cipher(Botan::StreamCipher::create(algo, provider_ask));
if(!cipher)
{
- result.note_missing(algo + " from " + provider);
+ result.note_missing(algo + " from " + provider_ask);
continue;
}
+ const std::string provider(cipher->provider());
+ result.test_is_nonempty("provider", provider);
result.test_eq(provider, cipher->name(), algo);
cipher->set_key(key);