/src/botan/build/include/botan/internal/getentropy.h
Line  | Count  | Source (jump to first uncovered line)  | 
1  |  | /*  | 
2  |  | * Entropy Source Using OpenBSD getentropy(2) system call  | 
3  |  | * (C) 2017 Alexander Bluhm (genua GmbH)  | 
4  |  | *  | 
5  |  | * Botan is released under the Simplified BSD License (see license.txt)  | 
6  |  | */  | 
7  |  |  | 
8  |  | #ifndef BOTAN_ENTROPY_SRC_GETENTROPY_H_  | 
9  |  | #define BOTAN_ENTROPY_SRC_GETENTROPY_H_  | 
10  |  |  | 
11  |  | #include <botan/entropy_src.h>  | 
12  |  |  | 
13  |  | namespace Botan { | 
14  |  |  | 
15  |  | /**  | 
16  |  | * Entropy source using the getentropy(2) system call first introduced in  | 
17  |  | * OpenBSD 5.6 and added to Solaris 11.3.  | 
18  |  | */  | 
19  |  | class Getentropy final : public Entropy_Source { | 
20  |  |    public:  | 
21  | 0  |       std::string name() const override { return "getentropy"; } | 
22  |  |  | 
23  |  |       size_t poll(RandomNumberGenerator& rng) override;  | 
24  |  | };  | 
25  |  |  | 
26  |  | }  // namespace Botan  | 
27  |  |  | 
28  |  | #endif  |