pub fn scrypt(
password: &[u8],
salt: &[u8],
params: &ScryptParams,
output: &mut [u8]
) -> Result<(), InvalidOutputLen>
Expand description
The scrypt key derivation function.
Arguments
password
- The password to process as a byte vectorsalt
- The salt value to use as a byte vectorparams
- The ScryptParams to useoutput
- The resulting derived key is returned in this byte vector. WARNING: Make sure to compare this value in constant time!
Return
Ok(())
if calculation is succesfull and Err(InvalidOutputLen)
if
output
does not satisfy the following condition:
output.len() > 0 && output.len() <= (2^32 - 1) * 32
.