[−][src]Struct xxhrs::EntropyPool
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]
fn clone(&self) -> EntropyPool
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for EntropyPool
[src]
impl Eq for EntropyPool
[src]
impl PartialEq<EntropyPool> for EntropyPool
[src]
Auto Trait Implementations
impl RefUnwindSafe for EntropyPool
impl Send for EntropyPool
impl Sync for EntropyPool
impl Unpin for EntropyPool
impl UnwindSafe for EntropyPool
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
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>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,