Skip to main content

prepare

Function prepare 

Source
pub async fn prepare(
    variant: Sha2Variant,
    input: &Password,
    salt: impl Into<Vec<u8>>,
    iterations: u32,
) -> Result<DeriveInput, Error>
Expand description

Parameterize a PBKDF2 derivation over an imported password.

salt should be a per-password random value (RFC 8018 recommends at least 8 bytes; NIST SP 800-132 at least 16). iterations is the work factor — choose it as high as the deployment tolerates; a zero count fails Error::Other. The grants are copied from input.