From 4c5847412d41756aab738a3746666cfaffe5d4af Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sat, 23 Jan 2016 10:44:18 -0500 Subject: Make the DRBG hash selectable in build.h with BOTAN_AUTO_RNG_DRBG_HASH_FUNCTION Add some missing overrides --- src/lib/rng/hmac_drbg/hmac_drbg.h | 4 ++-- src/lib/rng/rng.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/rng') diff --git a/src/lib/rng/hmac_drbg/hmac_drbg.h b/src/lib/rng/hmac_drbg/hmac_drbg.h index d7a1d76aa..f52ae9de1 100644 --- a/src/lib/rng/hmac_drbg/hmac_drbg.h +++ b/src/lib/rng/hmac_drbg/hmac_drbg.h @@ -28,10 +28,10 @@ class BOTAN_DLL HMAC_DRBG final : public Stateful_RNG void clear() override; - void randomize(byte output[], size_t output_len); + void randomize(byte output[], size_t output_len) override; void randomize_with_input(byte output[], size_t output_len, - const byte input[], size_t input_len); + const byte input[], size_t input_len) override; void add_entropy(const byte input[], size_t input_len) override; private: diff --git a/src/lib/rng/rng.cpp b/src/lib/rng/rng.cpp index 218b9c842..526693561 100644 --- a/src/lib/rng/rng.cpp +++ b/src/lib/rng/rng.cpp @@ -112,7 +112,7 @@ RandomNumberGenerator* RandomNumberGenerator::make_rng() AutoSeeded_RNG::AutoSeeded_RNG(size_t max_bytes_before_reseed) { - m_rng.reset(new HMAC_DRBG("SHA-384", max_bytes_before_reseed)); + m_rng.reset(new HMAC_DRBG(BOTAN_AUTO_RNG_DRBG_HASH_FUNCTION, max_bytes_before_reseed)); size_t bits = m_rng->reseed(384); if(!m_rng->is_seeded()) { -- cgit v1.2.3