aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/main.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-01-15 19:42:30 -0500
committerJack Lloyd <[email protected]>2016-07-17 10:43:34 -0400
commit8a1aead31c9ae9caa405c6951de8aa51d6a4b751 (patch)
treeac0c166c8b98a4c25b69c91aa4d5c2d0bc5bda42 /src/tests/main.cpp
parentcd1e2d3bff92a2d91343541e2cf83287dce87c6f (diff)
Switch to HMAC_DRBG for all RNG generation.
Add support and tests for additional_data param to HMAC_DRBG Add Stateful_RNG class which has fork detection and periodic reseeding. AutoSeeded_RNG passes the current pid and time as additional_data
Diffstat (limited to 'src/tests/main.cpp')
-rw-r--r--src/tests/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tests/main.cpp b/src/tests/main.cpp
index a330bd79a..79be98a0e 100644
--- a/src/tests/main.cpp
+++ b/src/tests/main.cpp
@@ -140,8 +140,9 @@ class Test_Runner : public Botan_CLI::Command
}
output() << " rng:HMAC_DRBG with seed '" << Botan::hex_encode(seed) << "'";
- rng.reset(new Botan::Serialized_RNG(new Botan::HMAC_DRBG("HMAC(SHA-384)")));
- rng->add_entropy(seed.data(), seed.size());
+ std::unique_ptr<Botan::HMAC_DRBG> drbg(new Botan::HMAC_DRBG("SHA-384", 0));
+ drbg->initialize_with(seed.data(), seed.size());
+ rng.reset(new Botan::Serialized_RNG(drbg.release()));
#else