diff options
author | lloyd <[email protected]> | 2008-10-28 18:12:58 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-28 18:12:58 +0000 |
commit | 104795c6735256c293976d428a35657cdb46629a (patch) | |
tree | 02a64afbea97547b3dd20caa8bf3ee696e3cbf07 /src/rng/hmac_rng/hmac_rng.cpp | |
parent | 6297fa41813ab9d8951f6469bd9d7336ba873f8a (diff) |
In HMAC_RNG, force a reseed after 8192 blocks
Diffstat (limited to 'src/rng/hmac_rng/hmac_rng.cpp')
-rw-r--r-- | src/rng/hmac_rng/hmac_rng.cpp | 3 |
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(); } } |