aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_tss.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test_tss.cpp')
-rw-r--r--src/tests/test_tss.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tests/test_tss.cpp b/src/tests/test_tss.cpp
index aacacd0bc..01e0da92f 100644
--- a/src/tests/test_tss.cpp
+++ b/src/tests/test_tss.cpp
@@ -7,10 +7,12 @@
#include "tests.h"
#if defined(BOTAN_HAS_THRESHOLD_SECRET_SHARING)
- #include <botan/tss.h>
- #include <botan/hex.h>
+ #include <botan/tss.h>
+ #include <botan/hex.h>
#endif
+#include <numeric>
+
namespace Botan_Tests {
namespace {
@@ -26,8 +28,7 @@ class TSS_Tests : public Test
Test::Result result("TSS");
uint8_t id[16];
- for(int i = 0; i != 16; ++i)
- id[i] = i;
+ std::iota(id, id + sizeof(id), 0);
const std::vector<uint8_t> S = Botan::hex_decode("7465737400");
@@ -35,7 +36,7 @@ class TSS_Tests : public Test
Botan::RTSS_Share::split(2, 4, S.data(), S.size(), id, Test::rng());
result.test_eq("reconstruction", Botan::RTSS_Share::reconstruct(shares), S);
- shares.resize(shares.size()-1);
+ shares.resize(shares.size() - 1);
result.test_eq("reconstruction after removal", Botan::RTSS_Share::reconstruct(shares), S);
results.push_back(result);