[][src]Struct xxhrs::EntropyPool

pub struct EntropyPool {
    pub entropy: [u8; 192],
}

Besides seeded and unseeded variants, XXH3 provides a keyed (withSecret) variant. This is a bit of a misnomer though, because these functions havea not been formally verified as message authentication codes; they also do not guarantee that the entire secret is used, the secret is impractically large (tens to hundreds of bytes) and pathological secrets are not handled well at all.

However, these functions are harder to revers than using seeds, in fact the seeded variant internally just uses a modified secret.

This is why xxhrs provides support for these, but renames the secrets "EntropyPool" to make it clear that it is not really a proper keyed hash.

You can generate a random EntropyPool or use the key derivation function provided by the c library. You could also fill the secret manually, for instance using HMAC-SHA256 or Kekkac, but this is probably overkill.

Fields

entropy: [u8; 192]

Implementations

impl EntropyPool[src]

pub fn randomize() -> Self[src]

Use the getrandom crate to create a randomized EntropyPool

pub fn with_key(key: &[u8]) -> Self[src]

Use the higher quality entropy derivation scheme from variable length input keys

Trait Implementations

impl Clone for EntropyPool[src]

impl Debug for EntropyPool[src]

impl Eq for EntropyPool[src]

impl PartialEq<EntropyPool> for EntropyPool[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.