pub fn derive(alg: PasswordAlg, salt: &[u8], password: &str, output_key: &mut [u8]) {
    // scrypt is the only password hashing algorithm we support for now
    assert_eq!(alg, PasswordAlg::SCRYPT);

    scrypt::scrypt(password.as_bytes(), salt, &params(), output_key);
}
/// Derive a cryptographically secure key from the given password and salt
Derive a cryptographically secure key from the given password and salt
Derive a cryptographically secure key from the given password and salt
pub fn derive(alg: PasswordAlg, salt: &[u8], password: &str, output_key: &mut [u8]) {
    // scrypt is the only password hashing algorithm we support for now
    assert_eq!(alg, PasswordAlg::SCRYPT);
    scrypt::scrypt(password.as_bytes(), salt, &params(), output_key);
}
pub fn derive ( alg : PasswordAlg , salt : & [ u8 ] , password : & str , output_key : & mut [ u8 ] ) { // scrypt is the only password hashing algorithm we support for now assert_eq ! ( alg PasswordAlg SCRYPT ) ; scrypt :: scrypt ( password . as_bytes ( ) , salt , & params ( ) , output_key ) ; }
Derive a cryptographically secure key from the given password and salt
Derive a cryptographically secure key from the given password and salt
alg
PasswordAlg
salt
&[u8]
password
&str
output_key
&mut [u8]
alg
PasswordAlg
salt
&[u8]
password
&str
output_key
&mut [u8]