Botan  1.10.9
dev_random.h
Go to the documentation of this file.
1 /*
2 * /dev/random EntropySource
3 * (C) 1999-2009 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7 
8 #ifndef BOTAN_ENTROPY_SRC_DEVICE_H__
9 #define BOTAN_ENTROPY_SRC_DEVICE_H__
10 
11 #include <botan/entropy_src.h>
12 #include <vector>
13 #include <string>
14 
15 namespace Botan {
16 
17 /**
18 * Entropy source reading from kernel devices like /dev/random
19 */
21  {
22  public:
23  std::string name() const { return "RNG Device Reader"; }
24 
25  void poll(Entropy_Accumulator& accum);
26 
27  Device_EntropySource(const std::vector<std::string>& fsnames);
29  private:
30  typedef int fd_type;
31 
32  std::vector<fd_type> devices;
33  };
34 
35 }
36 
37 #endif
Device_EntropySource(const std::vector< std::string > &fsnames)
Definition: dev_random.cpp:41
void poll(Entropy_Accumulator &accum)
Definition: dev_random.cpp:63
std::string name() const
Definition: dev_random.h:23