Botan
2.1.0
Crypto and TLS for C++11
Main Page
Namespaces
Classes
Files
File List
File Members
src
lib
entropy
dev_random
dev_random.h
Go to the documentation of this file.
1
/*
2
* /dev/random EntropySource
3
* (C) 1999-2009 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
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
*/
20
class
Device_EntropySource
final :
public
Entropy_Source
21
{
22
public
:
23
std::string
name
()
const override
{
return
"dev_random"
; }
24
25
size_t
poll
(
RandomNumberGenerator
& rng)
override
;
26
27
Device_EntropySource
(
const
std::vector<std::string>& fsnames);
28
29
~Device_EntropySource
();
30
private
:
31
std::vector<int> m_dev_fds;
32
int
m_max_fd;
33
};
34
35
}
36
37
#endif
Botan::Device_EntropySource::Device_EntropySource
Device_EntropySource(const std::vector< std::string > &fsnames)
Definition:
dev_random.cpp:23
Botan::Device_EntropySource::~Device_EntropySource
~Device_EntropySource()
Definition:
dev_random.cpp:69
Botan::RandomNumberGenerator
Definition:
rng.h:25
Botan::Device_EntropySource
Definition:
dev_random.h:20
Botan
Definition:
alg_id.cpp:13
Botan::Device_EntropySource::poll
size_t poll(RandomNumberGenerator &rng) override
Definition:
dev_random.cpp:81
Botan::Device_EntropySource::name
std::string name() const override
Definition:
dev_random.h:23
Botan::Entropy_Source
Definition:
entropy_src.h:25
Generated on Fri Aug 4 2017 19:29:38 for Botan by
1.8.9.1