diff options
author | lloyd <[email protected]> | 2008-09-28 19:29:24 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-28 19:29:24 +0000 |
commit | 9bcfe627321ddc81691b835dffaa6324ac4684a4 (patch) | |
tree | fe5e8ae9813b853549558b59833022e87e83981b /src/rng/x931_rng/x931_rng.h | |
parent | 9822a701516396b7de4e41339faecd48ff8dc8ff (diff) |
Move all modules into src/ directory
Diffstat (limited to 'src/rng/x931_rng/x931_rng.h')
-rw-r--r-- | src/rng/x931_rng/x931_rng.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/rng/x931_rng/x931_rng.h b/src/rng/x931_rng/x931_rng.h new file mode 100644 index 000000000..7914b605d --- /dev/null +++ b/src/rng/x931_rng/x931_rng.h @@ -0,0 +1,42 @@ +/************************************************* +* ANSI X9.31 RNG Header File * +* (C) 1999-2008 Jack Lloyd * +*************************************************/ + +#ifndef BOTAN_ANSI_X931_RNG_H__ +#define BOTAN_ANSI_X931_RNG_H__ + +#include <botan/rng.h> +#include <botan/base.h> + +namespace Botan { + +/************************************************* +* ANSI X9.31 RNG * +*************************************************/ +class BOTAN_DLL ANSI_X931_RNG : public RandomNumberGenerator + { + public: + void randomize(byte[], u32bit); + bool is_seeded() const; + void clear() throw(); + std::string name() const; + + void reseed(); + void add_entropy_source(EntropySource*); + void add_entropy(const byte[], u32bit); + + ANSI_X931_RNG(const std::string&, RandomNumberGenerator*); + ~ANSI_X931_RNG(); + private: + void update_buffer(); + + BlockCipher* cipher; + RandomNumberGenerator* prng; + SecureVector<byte> V, R; + u32bit position; + }; + +} + +#endif |