Trait Pbkdf

Source
pub trait Pbkdf {
    // Required methods
    fn info(&self) -> PbkdfInfo;
    fn derive(
        &self,
        buf: &mut [u8],
        password: &[u8],
        salt: &[u8],
        cpu_cost: u64,
    ) -> Result<(), Box<dyn Error + 'static>>;
}
Expand description

A stateless (oneshot) PBKDF interface

Required Methods§

Source

fn info(&self) -> PbkdfInfo

Returns information about the PBKDF

Source

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

Fills buf with key bytes derived from password parametrized by cpu_cost

Implementors§