aboutsummaryrefslogtreecommitdiffstats
path: root/src/rng/x931_rng
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-06-16 03:54:59 +0000
committerlloyd <[email protected]>2010-06-16 03:54:59 +0000
commitaa0c77746be858f094debf0d96e87c02908e8dc3 (patch)
tree98d66a941f476ad035ffc18138998b4bc1dfb8b9 /src/rng/x931_rng
parent85780f6bbe02d7abd573f5b47bf9e79c611f5022 (diff)
Yet more Doxygen comments
Diffstat (limited to 'src/rng/x931_rng')
-rw-r--r--src/rng/x931_rng/x931_rng.cpp22
-rw-r--r--src/rng/x931_rng/x931_rng.h8
2 files changed, 18 insertions, 12 deletions
diff --git a/src/rng/x931_rng/x931_rng.cpp b/src/rng/x931_rng/x931_rng.cpp
index 3ff180898..f812377ed 100644
--- a/src/rng/x931_rng/x931_rng.cpp
+++ b/src/rng/x931_rng/x931_rng.cpp
@@ -11,7 +11,7 @@
namespace Botan {
-/**
+/*
* Generate a buffer of random bytes
*/
void ANSI_X931_RNG::randomize(byte out[], u32bit length)
@@ -33,7 +33,7 @@ void ANSI_X931_RNG::randomize(byte out[], u32bit length)
}
}
-/**
+/*
* Refill the internal state
*/
void ANSI_X931_RNG::update_buffer()
@@ -52,7 +52,7 @@ void ANSI_X931_RNG::update_buffer()
position = 0;
}
-/**
+/*
* Reset V and the cipher key with new values
*/
void ANSI_X931_RNG::rekey()
@@ -71,7 +71,7 @@ void ANSI_X931_RNG::rekey()
}
}
-/**
+/*
* Reseed the internal state
*/
void ANSI_X931_RNG::reseed(u32bit poll_bits)
@@ -80,7 +80,7 @@ void ANSI_X931_RNG::reseed(u32bit poll_bits)
rekey();
}
-/**
+/*
* Add a entropy source to the underlying PRNG
*/
void ANSI_X931_RNG::add_entropy_source(EntropySource* src)
@@ -88,7 +88,7 @@ void ANSI_X931_RNG::add_entropy_source(EntropySource* src)
prng->add_entropy_source(src);
}
-/**
+/*
* Add some entropy to the underlying PRNG
*/
void ANSI_X931_RNG::add_entropy(const byte input[], u32bit length)
@@ -97,7 +97,7 @@ void ANSI_X931_RNG::add_entropy(const byte input[], u32bit length)
rekey();
}
-/**
+/*
* Check if the the PRNG is seeded
*/
bool ANSI_X931_RNG::is_seeded() const
@@ -105,7 +105,7 @@ bool ANSI_X931_RNG::is_seeded() const
return (V.size() > 0);
}
-/**
+/*
* Clear memory of sensitive data
*/
void ANSI_X931_RNG::clear()
@@ -118,7 +118,7 @@ void ANSI_X931_RNG::clear()
position = 0;
}
-/**
+/*
* Return the name of this type
*/
std::string ANSI_X931_RNG::name() const
@@ -126,7 +126,7 @@ std::string ANSI_X931_RNG::name() const
return "X9.31(" + cipher->name() + ")";
}
-/**
+/*
* ANSI X931 RNG Constructor
*/
ANSI_X931_RNG::ANSI_X931_RNG(BlockCipher* cipher_in,
@@ -142,7 +142,7 @@ ANSI_X931_RNG::ANSI_X931_RNG(BlockCipher* cipher_in,
position = 0;
}
-/**
+/*
* ANSI X931 RNG Destructor
*/
ANSI_X931_RNG::~ANSI_X931_RNG()
diff --git a/src/rng/x931_rng/x931_rng.h b/src/rng/x931_rng/x931_rng.h
index d5ba2e9eb..345ee3ca9 100644
--- a/src/rng/x931_rng/x931_rng.h
+++ b/src/rng/x931_rng/x931_rng.h
@@ -28,7 +28,13 @@ class BOTAN_DLL ANSI_X931_RNG : public RandomNumberGenerator
void add_entropy_source(EntropySource*);
void add_entropy(const byte[], u32bit);
- ANSI_X931_RNG(BlockCipher*, RandomNumberGenerator*);
+ /**
+ * @param cipher the block cipher to use in this PRNG
+ * @param rng the underlying PRNG for generating inputs
+ * (eg, an HMAC_RNG)
+ */
+ ANSI_X931_RNG(BlockCipher* cipher,
+ RandomNumberGenerator* rng);
~ANSI_X931_RNG();
private:
void rekey();