pub fn new_password(
        password: &Secret,
        salt: &Salt,
        ops_limit: usize,
        mem_limit: usize,
    ) -> Result<Self> {
        let mut key_buffer = Secret::with_len(KEY_BYTES)?;
        derive_key(&mut key_buffer, password, salt, ops_limit, mem_limit)?;
        Self::deserialize(key_buffer)
    }
/// Derive a new key from the given password. Note that the derived key will
/// be different if any of the parameters to this function change, so they
/// need to remain fixed if you e.g. re-derive the key to decrypt some
/// previously-encrypted data.
Derive a new key from the given password. Note that the derived key will
be different if any of the parameters to this function change, so they
need to remain fixed if you e.g. re-derive the key to decrypt some
previously-encrypted data.
Derive a new key from the given password . Note that the derived key will be different if any of the parameters to this function change so they need to remain fixed if you e . g . re - derive the key to decrypt some previously - encrypted data .
pub fn new_password(
        password: &Secret,
        salt: &Salt,
        ops_limit: usize,
        mem_limit: usize,
    ) -> Result<Self> {
        let mut key_buffer = Secret::with_len(KEY_BYTES)?;
        derive_key(&mut key_buffer, password, salt, ops_limit, mem_limit)?;
        Self::deserialize(key_buffer)
    }
pub fn new_password ( password : & Secret , salt : & Salt , ops_limit : usize , mem_limit : usize , ) -> Result < Self > { let mut key_buffer = Secret :: with_len ( KEY_BYTES ) ? ; derive_key ( & mut key_buffer , password , salt , ops_limit , mem_limit ) ? ; Self :: deserialize ( key_buffer ) }
Derive a new key from the given password.
Derive a new key from the given password .
password
&Secret
salt
&Salt
ops_limit
usize
mem_limit
usize
password
&Secret
salt
&Salt
ops_limit
usize
mem_limit
usize