diff options
author | lloyd <[email protected]> | 2009-12-16 00:32:49 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-12-16 00:32:49 +0000 |
commit | 87cbaef441c6baba2699a8ea53ac2562c46c772d (patch) | |
tree | a61455bcb4de0e0eab34953f7a53a84b512f34d3 /src/entropy/dev_random/es_dev.h | |
parent | 076afc21c2b775d2658f33086b890255f6f2c70f (diff) |
Full working amalgamation build, plus internal-only headers concept.
Diffstat (limited to 'src/entropy/dev_random/es_dev.h')
-rw-r--r-- | src/entropy/dev_random/es_dev.h | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/entropy/dev_random/es_dev.h b/src/entropy/dev_random/es_dev.h deleted file mode 100644 index df9dbe1c1..000000000 --- a/src/entropy/dev_random/es_dev.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* /dev/random EntropySource -* (C) 1999-2009 Jack Lloyd -* -* Distributed under the terms of the Botan license -*/ - -#ifndef BOTAN_ENTROPY_SRC_DEVICE_H__ -#define BOTAN_ENTROPY_SRC_DEVICE_H__ - -#include <botan/entropy_src.h> -#include <vector> -#include <string> - -namespace Botan { - -class BOTAN_DLL Device_EntropySource : public EntropySource - { - public: - std::string name() const { return "RNG Device Reader"; } - - void poll(Entropy_Accumulator& accum); - - Device_EntropySource(const std::vector<std::string>& fsnames); - ~Device_EntropySource(); - private: - - /** - A class handling reading from a Unix character device - */ - class Device_Reader - { - public: - typedef int fd_type; - - // Does not own fd, a transient class - Device_Reader(fd_type device_fd) : fd(device_fd) {} - - void close(); - - u32bit get(byte out[], u32bit length, u32bit ms_wait_time); - - static fd_type open(const std::string& pathname); - private: - fd_type fd; - }; - - std::vector<Device_Reader> devices; - }; - -} - -#endif |