fn attempt_decrypt(encrypted_data: &[u8], password: &str) -> bool {
    let result = crypto::blowfish2_decrypt(
        &encrypted_data[0..PEEK_SIZE.min(encrypted_data.len())],
        password,
    );
    crypto::is_utf8_prefix(&result)
}
// Tries to decrypt the file using given password.
// If the obtained plaintext is valid UTF8, the operation
// is considered succesful.
Tries to decrypt the file using given password.
If the obtained plaintext is valid UTF8, the operation
is considered succesful.
Tries to decrypt the file using given password . If the obtained plaintext is valid UTF8 the operation is considered succesful .
fn attempt_decrypt(encrypted_data: &[u8], password: &str) -> bool {
    let result = crypto::blowfish2_decrypt(
        &encrypted_data[0..PEEK_SIZE.min(encrypted_data.len())],
        password,
    );
    crypto::is_utf8_prefix(&result)
}
fn attempt_decrypt ( encrypted_data : & [ u8 ] , password : & str ) -> bool { let result = crypto :: blowfish2_decrypt ( & encrypted_data [ 0 .. PEEK_SIZE . min ( encrypted_data . len ( ) ) ] , password , ) ; crypto :: is_utf8_prefix ( & result ) }
Tries to decrypt the file using given password.
Tries to decrypt the file using given password .
encrypted_data
&[u8]
password
&str