aboutsummaryrefslogtreecommitdiffstats
path: root/src/rng
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-30 06:47:38 +0000
committerlloyd <[email protected]>2008-09-30 06:47:38 +0000
commit66869d7e0fcaf120f5c22eee43277fabd00e94fd (patch)
tree5161b89557a8a8cd8f69ee7459368391872980fb /src/rng
parent33bb3dca54ecef2599b756d27b66781e14d06ae3 (diff)
Remove lookup.h from X9.31 PRNG, X9.19 MAC, SSLv3 MAC, PBKDF1
Diffstat (limited to 'src/rng')
-rw-r--r--src/rng/x931_rng/x931_rng.cpp13
-rw-r--r--src/rng/x931_rng/x931_rng.h2
2 files changed, 7 insertions, 8 deletions
diff --git a/src/rng/x931_rng/x931_rng.cpp b/src/rng/x931_rng/x931_rng.cpp
index f4b0f71a9..72ddb51c5 100644
--- a/src/rng/x931_rng/x931_rng.cpp
+++ b/src/rng/x931_rng/x931_rng.cpp
@@ -4,7 +4,6 @@
*************************************************/
#include <botan/x931_rng.h>
-#include <botan/lookup.h>
#include <botan/xor_buf.h>
#include <algorithm>
@@ -117,14 +116,14 @@ std::string ANSI_X931_RNG::name() const
/*************************************************
* ANSI X931 RNG Constructor *
*************************************************/
-ANSI_X931_RNG::ANSI_X931_RNG(const std::string& cipher_name,
- RandomNumberGenerator* prng_ptr)
+ANSI_X931_RNG::ANSI_X931_RNG(BlockCipher* cipher_in,
+ RandomNumberGenerator* prng_in)
{
- if(!prng_ptr)
- throw Invalid_Argument("ANSI_X931_RNG constructor: NULL prng");
+ if(!prng_in || !cipher_in)
+ throw Invalid_Argument("ANSI_X931_RNG constructor: NULL arguments");
- prng = prng_ptr;
- cipher = get_block_cipher(cipher_name);
+ cipher = cipher_in;
+ prng = prng_in;
R.create(cipher->BLOCK_SIZE);
position = 0;
diff --git a/src/rng/x931_rng/x931_rng.h b/src/rng/x931_rng/x931_rng.h
index 7914b605d..220b47ab8 100644
--- a/src/rng/x931_rng/x931_rng.h
+++ b/src/rng/x931_rng/x931_rng.h
@@ -26,7 +26,7 @@ class BOTAN_DLL ANSI_X931_RNG : public RandomNumberGenerator
void add_entropy_source(EntropySource*);
void add_entropy(const byte[], u32bit);
- ANSI_X931_RNG(const std::string&, RandomNumberGenerator*);
+ ANSI_X931_RNG(BlockCipher*, RandomNumberGenerator*);
~ANSI_X931_RNG();
private:
void update_buffer();