aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rng/hmac_rng/hmac_rng.cpp3
1 files changed, 3 insertions, 0 deletions
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();
}
}