Skip to main content

EntropySource

Trait EntropySource 

Source
pub trait EntropySource: Send + Sync {
    // Required methods
    fn info(&self) -> &SourceInfo;
    fn is_available(&self) -> bool;
    fn collect(&self, n_samples: usize) -> Vec<u8> ;

    // Provided method
    fn name(&self) -> &'static str { ... }
}
Expand description

Trait that every entropy source must implement.

Required Methods§

Source

fn info(&self) -> &SourceInfo

Source metadata.

Source

fn is_available(&self) -> bool

Check if this source can operate on the current machine.

Source

fn collect(&self, n_samples: usize) -> Vec<u8>

Collect raw entropy samples. Returns a Vec<u8> of up to n_samples bytes.

Provided Methods§

Source

fn name(&self) -> &'static str

Convenience: name from info.

Implementors§

Source§

impl EntropySource for AudioNoiseSource

Source§

impl EntropySource for BluetoothNoiseSource

Source§

impl EntropySource for CameraNoiseSource

Source§

impl EntropySource for CompressionTimingSource

Source§

impl EntropySource for HashTimingSource

Source§

impl EntropySource for CPUIOBeatSource

Source§

impl EntropySource for CPUMemoryBeatSource

Source§

impl EntropySource for MultiDomainBeatSource

Source§

impl EntropySource for DiskIOSource

Source§

impl EntropySource for AMXTimingSource

Source§

impl EntropySource for CASContentionSource

Source§

impl EntropySource for DVFSRaceSource

Source§

impl EntropySource for KqueueEventsSource

Source§

impl EntropySource for MachIPCSource

Source§

impl EntropySource for PipeBufferSource

Source§

impl EntropySource for TLBShootdownSource

Source§

impl EntropySource for ThreadLifecycleSource

Source§

impl EntropySource for GPUTimingSource

Source§

impl EntropySource for IORegistryEntropySource

Source§

impl EntropySource for MemoryTimingSource

Source§

impl EntropySource for DNSTimingSource

Source§

impl EntropySource for TCPConnectSource

Source§

impl EntropySource for DispatchQueueSource

Source§

impl EntropySource for DyldTimingSource

Source§

impl EntropySource for SpotlightTimingSource

Source§

impl EntropySource for VMPageTimingSource

Source§

impl EntropySource for ProcessSource

Source§

impl EntropySource for SensorNoiseSource

Source§

impl EntropySource for CacheContentionSource

Source§

impl EntropySource for DRAMRowBufferSource

Source§

impl EntropySource for PageFaultTimingSource

Source§

impl EntropySource for SpeculativeExecutionSource

Source§

impl EntropySource for SysctlSource

Source§

impl EntropySource for ClockJitterSource

Source§

impl EntropySource for MachTimingSource

Source§

impl EntropySource for SleepJitterSource

Source§

impl EntropySource for VmstatSource

Source§

impl EntropySource for WiFiRSSISource