Botan  1.11.15
Static Public Member Functions
Botan::BeOS_EntropySource Class Reference

#include <es_beos.h>

Inheritance diagram for Botan::BeOS_EntropySource:
Botan::EntropySource

List of all members.

Static Public Member Functions

static void poll_available_sources (class Entropy_Accumulator &accum)

Detailed Description

BeOS Entropy Source

Definition at line 18 of file es_beos.h.


Member Function Documentation

void Botan::EntropySource::poll_available_sources ( class Entropy_Accumulator accum) [static, inherited]

Definition at line 108 of file entropy_srcs.cpp.

References Botan::Entropy_Accumulator::polling_goal_achieved().

Referenced by Botan::HMAC_RNG::reseed().

   {
   static std::vector<std::unique_ptr<EntropySource>> g_sources(get_default_entropy_sources());

   if(g_sources.empty())
      throw std::runtime_error("No entropy sources enabled at build time, poll failed");

   size_t poll_attempt = 0;

   while(!accum.polling_goal_achieved() && poll_attempt < 16)
      {
      const size_t src_idx = poll_attempt % g_sources.size();
      g_sources[src_idx]->poll(accum);
      ++poll_attempt;
      }
   }

The documentation for this class was generated from the following files: