Trait crypto_secretbox::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.

Implementations on Foreign Types§

source§

impl Kdf for Salsa20

Available on crate feature salsa20 only.
source§

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

source§

impl Kdf for ChaCha20

Available on crate feature chacha20 only.
source§

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

Implementors§

source§

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