Botan
2.1.0
Crypto and TLS for C++11
Main Page
Namespaces
Classes
Files
File List
File Members
src
lib
entropy
cryptoapi_rng
es_capi.h
Go to the documentation of this file.
1
/*
2
* Win32 CAPI EntropySource
3
* (C) 1999-2007 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7
8
#ifndef BOTAN_ENTROPY_SRC_WIN32_CAPI_H__
9
#define BOTAN_ENTROPY_SRC_WIN32_CAPI_H__
10
11
#include <botan/entropy_src.h>
12
#include <vector>
13
14
namespace
Botan
{
15
16
/**
17
* Win32 CAPI Entropy Source
18
*/
19
class
Win32_CAPI_EntropySource
final :
public
Entropy_Source
20
{
21
public
:
22
std::string
name
()
const override
{
return
"win32_cryptoapi"
; }
23
24
size_t
poll
(
RandomNumberGenerator
& rng)
override
;
25
26
/**
27
* Win32_Capi_Entropysource Constructor
28
* @param provs list of providers, separated by ':'
29
*/
30
explicit
Win32_CAPI_EntropySource
(
const
std::string& provs =
""
);
31
32
class
CSP_Handle
33
{
34
public
:
35
virtual
size_t
gen_random
(uint8_t out[],
size_t
n)
const
= 0;
36
};
37
private
:
38
std::vector<std::unique_ptr<CSP_Handle>> m_csp_provs;
39
};
40
41
}
42
43
#endif
Botan::Win32_CAPI_EntropySource
Definition:
es_capi.h:19
Botan::RandomNumberGenerator
Definition:
rng.h:25
Botan::Win32_CAPI_EntropySource::poll
size_t poll(RandomNumberGenerator &rng) override
Definition:
es_capi.cpp:53
Botan::Win32_CAPI_EntropySource::name
std::string name() const override
Definition:
es_capi.h:22
Botan::Win32_CAPI_EntropySource::CSP_Handle::gen_random
virtual size_t gen_random(uint8_t out[], size_t n) const =0
Botan::Win32_CAPI_EntropySource::Win32_CAPI_EntropySource
Win32_CAPI_EntropySource(const std::string &provs="")
Definition:
es_capi.cpp:75
Botan
Definition:
alg_id.cpp:13
Botan::Win32_CAPI_EntropySource::CSP_Handle
Definition:
es_capi.h:32
Botan::Entropy_Source
Definition:
entropy_src.h:25
Generated on Fri Aug 4 2017 19:29:38 for Botan by
1.8.9.1