aboutsummaryrefslogtreecommitdiffstats
path: root/src/rng/hmac_rng
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-06-17 21:48:55 +0000
committerlloyd <[email protected]>2010-06-17 21:48:55 +0000
commitc06b260b3328c5ce4be44c4f1a88feb55ee3dbc4 (patch)
tree41b05df5982b5b2e8a23b55972263d2172d6a9fd /src/rng/hmac_rng
parent0eecae9f21172c0a74ad62acaf77148c94a25be7 (diff)
parent3dde5683f69b9cb9f558bfb18087ce35fbbec78a (diff)
propagate from branch 'net.randombit.botan' (head 294e2082ce9231d6165276e2f2a4153a0116aca3)
to branch 'net.randombit.botan.c++0x' (head 0b695fad10f924601e07b009fcd781191fafcb28)
Diffstat (limited to 'src/rng/hmac_rng')
-rw-r--r--src/rng/hmac_rng/hmac_rng.cpp16
-rw-r--r--src/rng/hmac_rng/hmac_rng.h4
2 files changed, 12 insertions, 8 deletions
diff --git a/src/rng/hmac_rng/hmac_rng.cpp b/src/rng/hmac_rng/hmac_rng.cpp
index c185a5643..d8c031f6b 100644
--- a/src/rng/hmac_rng/hmac_rng.cpp
+++ b/src/rng/hmac_rng/hmac_rng.cpp
@@ -30,7 +30,7 @@ void hmac_prf(MessageAuthenticationCode* prf,
}
-/**
+/*
* Generate a buffer of random bytes
*/
void HMAC_RNG::randomize(byte out[], u32bit length)
@@ -53,7 +53,7 @@ void HMAC_RNG::randomize(byte out[], u32bit length)
}
}
-/**
+/*
* Poll for entropy and reset the internal keys
*/
void HMAC_RNG::reseed(u32bit poll_bits)
@@ -114,7 +114,7 @@ void HMAC_RNG::reseed(u32bit poll_bits)
seeded = true;
}
-/**
+/*
* Add user-supplied entropy to the extractor input
*/
void HMAC_RNG::add_entropy(const byte input[], u32bit length)
@@ -131,7 +131,7 @@ void HMAC_RNG::add_entropy(const byte input[], u32bit length)
reseed(128);
}
-/**
+/*
* Add another entropy source to the list
*/
void HMAC_RNG::add_entropy_source(EntropySource* src)
@@ -139,7 +139,7 @@ void HMAC_RNG::add_entropy_source(EntropySource* src)
entropy_sources.push_back(src);
}
-/**
+/*
* Clear memory of sensitive data
*/
void HMAC_RNG::clear()
@@ -152,7 +152,7 @@ void HMAC_RNG::clear()
seeded = false;
}
-/**
+/*
* Return the name of this type
*/
std::string HMAC_RNG::name() const
@@ -160,7 +160,7 @@ std::string HMAC_RNG::name() const
return "HMAC_RNG(" + extractor->name() + "," + prf->name() + ")";
}
-/**
+/*
* HMAC_RNG Constructor
*/
HMAC_RNG::HMAC_RNG(MessageAuthenticationCode* extractor_mac,
@@ -208,7 +208,7 @@ HMAC_RNG::HMAC_RNG(MessageAuthenticationCode* extractor_mac,
extractor->set_key(prf->process("Botan HMAC_RNG XTS"));
}
-/**
+/*
* HMAC_RNG Destructor
*/
HMAC_RNG::~HMAC_RNG()
diff --git a/src/rng/hmac_rng/hmac_rng.h b/src/rng/hmac_rng/hmac_rng.h
index 452357130..fc712b3ec 100644
--- a/src/rng/hmac_rng/hmac_rng.h
+++ b/src/rng/hmac_rng/hmac_rng.h
@@ -36,6 +36,10 @@ class BOTAN_DLL HMAC_RNG : public RandomNumberGenerator
void add_entropy_source(EntropySource* es);
void add_entropy(const byte[], u32bit);
+ /**
+ * @param extractor a MAC used for extracting the entropy
+ * @param prf a MAC used as a PRF using HKDF construction
+ */
HMAC_RNG(MessageAuthenticationCode* extractor,
MessageAuthenticationCode* prf);