Botan 1.10.17

es_unix.h
Go to the documentation of this file.
1 /*
2 * Unix EntropySource
3 * (C) 1999-2009 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7
8 #ifndef BOTAN_ENTROPY_SRC_UNIX_H__
9 #define BOTAN_ENTROPY_SRC_UNIX_H__
10
11 #include <botan/entropy_src.h>
12 #include <botan/internal/unix_cmd.h>
13 #include <vector>
14
15 namespace Botan {
16
17 /**
18 * Unix Entropy Source
19 */
20 class Unix_EntropySource : public EntropySource
21 {
22 public:
23 std::string name() const { return "Unix Entropy Source"; }
24
25 void poll(Entropy_Accumulator& accum);
26
27 void add_sources(const Unix_Program[], size_t);
28 Unix_EntropySource(const std::vector<std::string>& path);
29 private:
30 static std::vector<Unix_Program> get_default_sources();
31 void fast_poll(Entropy_Accumulator& accum);
32
33 const std::vector<std::string> PATH;
34 std::vector<Unix_Program> sources;
35 };
36
37 }
38
39 #endif
Botan::EntropySource
Definition: entropy_src.h:122
Botan::Unix_Program
Definition: unix_cmd.h:21
Botan::Unix_EntropySource::name
std::string name() const
Definition: es_unix.h:23
Botan::Unix_EntropySource::Unix_EntropySource
Unix_EntropySource(const std::vector< std::string > &path)
Definition: es_unix.cpp:38
Botan
Definition: algo_base.h:14
Botan::Unix_EntropySource::poll
void poll(Entropy_Accumulator &accum)
Definition: es_unix.cpp:60
Botan::Entropy_Accumulator
Definition: entropy_src.h:19
Botan::Unix_EntropySource
Definition: es_unix.h:20
Botan::Unix_EntropySource::add_sources
void add_sources(const Unix_Program[], size_t)
Definition: es_unix.cpp:48