calc_pbkdf2

Function calc_pbkdf2 

Source
pub fn calc_pbkdf2(
    secret: &str,
    salt: &[u8],
    iterations: u32,
) -> Result<Vec<u8>, Box<dyn Error>>
Expand description

Calculate PBKDF2 key derivation from secret and salt

§Arguments

  • secret - The password/secret to derive from
  • salt - The salt bytes to use for derivation
  • iterations - Number of iterations to perform

§Returns

Returns a Result containing the derived key as a Vec or an error