Botan
1.11.15
|
00001 /* 00002 * Win32 CAPI EntropySource 00003 * (C) 1999-2007 Jack Lloyd 00004 * 00005 * Botan is released under the Simplified BSD License (see license.txt) 00006 */ 00007 00008 #ifndef BOTAN_ENTROPY_SRC_WIN32_CAPI_H__ 00009 #define BOTAN_ENTROPY_SRC_WIN32_CAPI_H__ 00010 00011 #include <botan/entropy_src.h> 00012 #include <vector> 00013 00014 namespace Botan { 00015 00016 /** 00017 * Win32 CAPI Entropy Source 00018 */ 00019 class Win32_CAPI_EntropySource : public EntropySource 00020 { 00021 public: 00022 std::string name() const { return "Win32 CryptoGenRandom"; } 00023 00024 void poll(Entropy_Accumulator& accum); 00025 00026 /** 00027 * Win32_Capi_Entropysource Constructor 00028 * @param provs list of providers, separated by ':' 00029 */ 00030 Win32_CAPI_EntropySource(const std::string& provs = ""); 00031 private: 00032 std::vector<u64bit> prov_types; 00033 }; 00034 00035 } 00036 00037 #endif