[−][src]Function bcrypt_pbkdf::bcrypt_pbkdf
#[must_use] pub fn bcrypt_pbkdf(
passphrase: &str,
salt: &[u8],
rounds: u32,
output: &mut [u8]
) -> Result<(), Error>
The bcrypt_pbkdf function.
Arguments
passphrase
- The passphrase to process.salt
- The salt value to use as a byte vector.rounds
- The number of rounds to apply.output
- The resulting derived key is returned in this byte vector.
Returns
Ok(())
if everything is fine.Err(Error::InvalidParamLen)
ifpassphrase.is_empty() || salt.is_empty()
.Err(Error::InvalidRounds)
ifrounds == 0
.Err(Error::InvalidOutputLen)
ifoutput.is_empty() || output.len() > 1024
.