aboutsummaryrefslogtreecommitdiffstats
path: root/src/rng/x931_rng/x931_rng.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-01-31 10:48:07 +0000
committerlloyd <[email protected]>2009-01-31 10:48:07 +0000
commit716176904747020267858f4b8b2c04675d76c873 (patch)
treec5bcf2d7efdea8945c4daae75b48c8bea140523e /src/rng/x931_rng/x931_rng.h
parent89b72bf90264acc6cb84ee424e29ec4bd0e7539e (diff)
In the X9.31 PRNG, move the code that rekeys the cipher and generates V to
a new member function rekey, calling it from both reseed and add_entropy. Previously add_entropy worked without this because the PRNG would reseed itself automatically if it was not at the point when randomize() was called, but once this was removed it was necessary to ensure a rekey kicked off, if appropriate, when calling add_entropy.
Diffstat (limited to 'src/rng/x931_rng/x931_rng.h')
-rw-r--r--src/rng/x931_rng/x931_rng.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/rng/x931_rng/x931_rng.h b/src/rng/x931_rng/x931_rng.h
index 2c68b9cb4..b1cef8df3 100644
--- a/src/rng/x931_rng/x931_rng.h
+++ b/src/rng/x931_rng/x931_rng.h
@@ -1,7 +1,7 @@
-/*************************************************
-* ANSI X9.31 RNG Header File *
-* (C) 1999-2008 Jack Lloyd *
-*************************************************/
+/*
+* ANSI X9.31 RNG Header File
+* (C) 1999-2009 Jack Lloyd
+*/
#ifndef BOTAN_ANSI_X931_RNG_H__
#define BOTAN_ANSI_X931_RNG_H__
@@ -11,9 +11,9 @@
namespace Botan {
-/*************************************************
-* ANSI X9.31 RNG *
-*************************************************/
+/**
+* ANSI X9.31 RNG
+*/
class BOTAN_DLL ANSI_X931_RNG : public RandomNumberGenerator
{
public:
@@ -29,6 +29,7 @@ class BOTAN_DLL ANSI_X931_RNG : public RandomNumberGenerator
ANSI_X931_RNG(BlockCipher*, RandomNumberGenerator*);
~ANSI_X931_RNG();
private:
+ void rekey();
void update_buffer();
BlockCipher* cipher;