aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/rng/rng.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/rng/rng.cpp')
-rw-r--r--src/lib/rng/rng.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/rng/rng.cpp b/src/lib/rng/rng.cpp
index a5222c51d..462d8afa1 100644
--- a/src/lib/rng/rng.cpp
+++ b/src/lib/rng/rng.cpp
@@ -7,16 +7,15 @@
#include <botan/rng.h>
#include <botan/hmac_rng.h>
-#include <botan/internal/algo_registry.h>
+#include <botan/lookup.h>
namespace Botan {
RandomNumberGenerator* RandomNumberGenerator::make_rng()
{
- std::unique_ptr<RandomNumberGenerator> rng(
- new HMAC_RNG(make_a<MessageAuthenticationCode>("HMAC(SHA-512)"),
- make_a<MessageAuthenticationCode>("HMAC(SHA-256)"))
- );
+ std::unique_ptr<MessageAuthenticationCode> h1(make_message_auth("HMAC(SHA-512"));
+ std::unique_ptr<MessageAuthenticationCode> h2(h1->clone());
+ std::unique_ptr<RandomNumberGenerator> rng(new HMAC_RNG(h1.release(), h2.release()));
rng->reseed(256);