Trait KeyedXof

Source
pub trait KeyedXof: ExtendableOutputFunction {
    // Required method
    fn with_key(key: &[u8]) -> Result<Self>
       where Self: Sized;

    // Provided method
    fn keyed_generate(key: &[u8], data: &[u8], len: usize) -> Result<Vec<u8>>
       where Self: Sized { ... }
}
Expand description

Helper trait for XOFs that need keyed variants

Required Methods§

Source

fn with_key(key: &[u8]) -> Result<Self>
where Self: Sized,

Creates a new keyed XOF instance

Provided Methods§

Source

fn keyed_generate(key: &[u8], data: &[u8], len: usize) -> Result<Vec<u8>>
where Self: Sized,

Generates keyed output in a single call

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§