crypto_secretbox

Trait Kdf

Source
pub trait Kdf {
    // Required method
    fn kdf(key: &Key, nonce: &GenericArray<u8, U16>) -> Key;
}
Expand description

Key derivation function: trait for abstracting over HSalsa20 and HChaCha20.

Required Methods§

Source

fn kdf(key: &Key, nonce: &GenericArray<u8, U16>) -> Key

Derive a new key from the provided input key and nonce.

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.

Implementations on Foreign Types§

Source§

impl Kdf for Salsa20

Source§

fn kdf(key: &Key, nonce: &GenericArray<u8, U16>) -> Key

Implementors§

Source§

impl<C> Kdf for SecretBox<C>
where C: Kdf,