From 104795c6735256c293976d428a35657cdb46629a Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 28 Oct 2008 18:12:58 +0000 Subject: In HMAC_RNG, force a reseed after 8192 blocks --- src/rng/hmac_rng/hmac_rng.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/rng/hmac_rng/hmac_rng.cpp') diff --git a/src/rng/hmac_rng/hmac_rng.cpp b/src/rng/hmac_rng/hmac_rng.cpp index c60a732b5..1a9fedb6c 100644 --- a/src/rng/hmac_rng/hmac_rng.cpp +++ b/src/rng/hmac_rng/hmac_rng.cpp @@ -97,6 +97,9 @@ void HMAC_RNG::randomize(byte out[], u32bit length) out += copied; length -= copied; + + if(counter >= 8192) + reseed(); } } -- cgit v1.2.3