[][src]Trait crypto_api::kdf::Kdf

pub trait Kdf {
    fn info(&self) -> KdfInfo;
fn derive(
        &self,
        buf: &mut [u8],
        base_key: &[u8],
        salt: &[u8],
        info: &[u8]
    ) -> Result<(), Box<dyn Error + 'static>>; }

A stateless (oneshot) key derivation interface

Required methods

fn info(&self) -> KdfInfo

Returns information about the MAC

fn derive(
    &self,
    buf: &mut [u8],
    base_key: &[u8],
    salt: &[u8],
    info: &[u8]
) -> Result<(), Box<dyn Error + 'static>>

Fills buf with key bytes derived from base_key with salt and info

Loading content...

Implementors

Loading content...