Botan 1.10.17
es_egd.h
Go to the documentation of this file.
1/*
2* EGD EntropySource
3* (C) 1999-2007 Jack Lloyd
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_ENTROPY_SRC_EGD_H__
9#define BOTAN_ENTROPY_SRC_EGD_H__
10
11#include <botan/entropy_src.h>
12#include <string>
13#include <vector>
14
15namespace Botan {
16
17/**
18* EGD Entropy Source
19*/
21 {
22 public:
23 std::string name() const { return "EGD/PRNGD"; }
24
25 void poll(Entropy_Accumulator& accum);
26
27 EGD_EntropySource(const std::vector<std::string>&);
29 private:
30 class EGD_Socket
31 {
32 public:
33 EGD_Socket(const std::string& path);
34
35 void close();
36 size_t read(byte outbuf[], size_t length);
37 private:
38 static int open_socket(const std::string& path);
39
40 std::string socket_path;
41 int m_fd; // cached fd
42 };
43
44 std::vector<EGD_Socket> sockets;
45 };
46
47}
48
49#endif
std::string name() const
Definition es_egd.h:23
void poll(Entropy_Accumulator &accum)
Definition es_egd.cpp:138
EGD_EntropySource(const std::vector< std::string > &)
Definition es_egd.cpp:122