pub fn derive_secrets(acc_passphrase: &[u8], acc_password: &[u8]) -> (Vec<u8>, Vec<u8>, Vec<u8>) {
    let mut passphrase_hasher = Sha3::v512();
    let mut passphrase_hash = [0; SHA3_512_HASH_LEN];
    passphrase_hasher.update(&acc_passphrase);
    passphrase_hasher.finalize(&mut passphrase_hash);
    let passphrase = passphrase_hash.to_vec();

    let mut salt_hasher = Sha3::v512();
    let mut salt_hash = [0; SHA3_512_HASH_LEN];
    let salt_bytes = &passphrase_hash[SHA3_512_HASH_LEN / 2..];
    salt_hasher.update(&salt_bytes);
    salt_hasher.finalize(&mut salt_hash);
    let salt = salt_hash.to_vec();

    let mut password_hasher = Sha3::v512();
    let mut password_hash = [0; SHA3_512_HASH_LEN];
    password_hasher.update(&acc_password);
    password_hasher.finalize(&mut password_hash);
    let password = password_hash.to_vec();

    (passphrase, password, salt)
}
/// Derive Passphrase, Password and Salt (in order).
Derive Passphrase, Password and Salt (in order).
Derive Passphrase Password and Salt ( in order ) .
pub fn derive_secrets(acc_passphrase: &[u8], acc_password: &[u8]) -> (Vec<u8>, Vec<u8>, Vec<u8>) {
    let mut passphrase_hasher = Sha3::v512();
    let mut passphrase_hash = [0; SHA3_512_HASH_LEN];
    passphrase_hasher.update(&acc_passphrase);
    passphrase_hasher.finalize(&mut passphrase_hash);
    let passphrase = passphrase_hash.to_vec();
    let mut salt_hasher = Sha3::v512();
    let mut salt_hash = [0; SHA3_512_HASH_LEN];
    let salt_bytes = &passphrase_hash[SHA3_512_HASH_LEN / 2..];
    salt_hasher.update(&salt_bytes);
    salt_hasher.finalize(&mut salt_hash);
    let salt = salt_hash.to_vec();
    let mut password_hasher = Sha3::v512();
    let mut password_hash = [0; SHA3_512_HASH_LEN];
    password_hasher.update(&acc_password);
    password_hasher.finalize(&mut password_hash);
    let password = password_hash.to_vec();
    (passphrase, password, salt)
}
pub fn derive_secrets ( acc_passphrase : & [ u8 ] , acc_password : & [ u8 ] ) -> ( Vec < u8 > , Vec < u8 > , Vec < u8 > ) { let mut passphrase_hasher = Sha3 :: v512 ( ) ; let mut passphrase_hash = [ 0 ; SHA3_512_HASH_LEN ] ; passphrase_hasher . update ( & acc_passphrase ) ; passphrase_hasher . finalize ( & mut passphrase_hash ) ; let passphrase = passphrase_hash . to_vec ( ) ; let mut salt_hasher = Sha3 :: v512 ( ) ; let mut salt_hash = [ 0 ; SHA3_512_HASH_LEN ] ; let salt_bytes = & passphrase_hash [ SHA3_512_HASH_LEN / 2 .. ] ; salt_hasher . update ( & salt_bytes ) ; salt_hasher . finalize ( & mut salt_hash ) ; let salt = salt_hash . to_vec ( ) ; let mut password_hasher = Sha3 :: v512 ( ) ; let mut password_hash = [ 0 ; SHA3_512_HASH_LEN ] ; password_hasher . update ( & acc_password ) ; password_hasher . finalize ( & mut password_hash ) ; let password = password_hash . to_vec ( ) ; ( passphrase , password , salt ) }
Derive Passphrase, Password and Salt (in order).
Derive Passphrase Password and Salt ( in order ) .
acc_passphrase
&[u8]
acc_password
&[u8]