BiogasPoll

Struct BiogasPoll 

Source
pub struct BiogasPoll {
    biogas: usize,
}
Expand description

一个简单的伪熵池实现。

Fields§

§biogas: usize

Trait Implementations§

Source§

impl EntropyPool for BiogasPoll

Source§

fn new() -> Self

创建一个新的熵池实例。
Source§

fn try_fill(&mut self, dest: &mut [u8]) -> Result<usize, EntropyError>

尝试从熵池中提取随机字节来填充目标缓冲区。 Read more
Source§

fn add_entropy(&mut self, _data: &[u8], _entropy_bits: usize)

向熵池注入新的原始熵数据。 Read more
Source§

fn get_entropy_count(&self) -> usize

获取当前估计的熵池中高品质熵的位数。 Read more
Source§

fn is_seeded(&self) -> bool

检查熵池是否已经收集了足够的初始熵,可以安全地进行操作。

Auto Trait Implementations§

§

impl Freeze for BiogasPoll

§

impl RefUnwindSafe for BiogasPoll

§

impl Send for BiogasPoll

§

impl Sync for BiogasPoll

§

impl Unpin for BiogasPoll

§

impl UnwindSafe for BiogasPoll

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.