class HwRngCollector
Defined at line 21 of file ../../zircon/kernel/lib/crypto/include/lib/crypto/entropy/hw_rng_collector.h
An implementation of crypto::entropy::Collector that uses hw_rng_draw_entropy
as its entropy source. Currently, this is only supported on x86.
Public Methods
zx_status_t GetInstance (Collector ** ptr)
Gets the current HwRngCollector instance. Returns ZX_ERR_NOT_SUPPORTED if
hw_rng_draw_entropy is not supported.
This function is thread-safe, and the DrawEntropy() method of the global
HwRngCollector instance is also thread-safe.
Defined at line 18 of file ../../zircon/kernel/lib/crypto/entropy/hw_rng_collector.cc
size_t DrawEntropy (uint8_t * buf, size_t len)
Inherited from crypto::entropy::Collector; see comments there.
Note that this method internally uses a mutex to prevent multiple
accesses. It is safe to call this method from multiple threads, but it
may block.
TODO(andrewkrieger): Determine what level of thread safety is needed for
RNG reseeding, and support it more uniformly (e.g. have a thread safety
contract for Collector::DrawEntropy, obeyed by all implementations).
Defined at line 33 of file ../../zircon/kernel/lib/crypto/entropy/hw_rng_collector.cc
void HwRngCollector ()
Defined at line 31 of file ../../zircon/kernel/lib/crypto/entropy/hw_rng_collector.cc